neat css tricks

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
CodeEye
Forum Commoner
Posts: 25
Joined: Fri Jul 05, 2002 7:19 am

neat css tricks

Post 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
User avatar
Takuma
Forum Regular
Posts: 931
Joined: Sun Aug 04, 2002 10:24 am
Location: UK
Contact:

Post by Takuma »

What is "-" do? and isn't it better to specify the colour properly???
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post 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
Post Reply