...

View Full Version : All browser body margins/padding



pinkshiro
05-16-2005, 06:55 AM
Hi there,

I am working on a site. I origonally was declaring a "body" style in my css, but soon realised that i also need to declare a "html" style to correct something in opera. But now my margins are screwy in everything except IE. Following are the css for my body and html style tags. Can someone please tell me where the best place to set my margins/padding within these two style tags so that I have a 10pixel margin (or) padding on the top and bottom of the site.



html {
height: 100%;
margin: 0px, 0px, 0px, 0px;
padding: 10px, 0px, 10px, 0px;
}

body {
height: 100%;
background-color: #AAAAAA;
text-align: center;
}



Would really appreciate it if someone could help me! :)

glenngv
05-16-2005, 07:04 AM
For shorthand CSS properties, you separate each value by a space and not by a comma.

pinkshiro
05-16-2005, 07:14 AM
Thanks for the heads up on the commas. Updated css is:



html {
height: 100%;
margin: 0px 0px 0px 0px;
padding: 10px 0px 10px 0px;
}

body {
height: 100%;
background-color: #AAAAAA;
text-align: center;
}


however, this still isn't bearing any fruit in terms of the correct margins/padding. There is always a top margin, but on firefox, netscape and opera, the site is without a bottom border. Any suggestions?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum