Page 1 of 1

neat css tricks

Posted: Fri Sep 27, 2002 8:33 am
by CodeEye
i have found a really usefull centering trick
from bluerobot.com

#canvas{
position: relative;
left: 2%;
top: 50%;
height: 350px;
width:98%;
margin: -175px 0px 0px -1%;
}

it also works in allot of browsers

and this one

css code
h2.itemhead
{
display:inline;
position:relative;
top:-18px;
background-color:#fff;
border:1px solid #aaa;
font-weight:normal;
text-transform: uppercase;
}

see what it looks like at http://www.scottandrew.com

thought you might find these usefull

Posted: Sat Sep 28, 2002 2:37 pm
by Takuma
What is "-" do? and isn't it better to specify the colour properly???

Posted: Sun Sep 29, 2002 3:16 am
by twigletmac
Takuma wrote:What is "-" do?
It's a minus sign, it makes the number it goes in front of negative.
Takuma wrote:and isn't it better to specify the colour properly???
What do you mean #ffffff instead of #fff? Probably depends on what you prefer rather than to which is better.

Mac