TheFilmGod Posted June 25, 2007 Share Posted June 25, 2007 To center the contents I am using the following CSS: body { background-color: #C0C0C0; margin: 0px auto; width: 950px; } LOOK AT the margin: 0px auto; It works in IE 6 and FF well, but it does not give any top margin. Seems like its cut off! How do I fix this so there is a bit of margin at top and its still centered? Link to comment https://forums.phpfreaks.com/topic/57094-solved-center-it/ Share on other sites More sharing options...
pikemsu28 Posted June 25, 2007 Share Posted June 25, 2007 try using: body{ background-color: #c0c0c0; margin-left: auto; margin-right: auto: width: 950px; } Link to comment https://forums.phpfreaks.com/topic/57094-solved-center-it/#findComment-282271 Share on other sites More sharing options...
TheFilmGod Posted June 26, 2007 Author Share Posted June 26, 2007 It worked. I changed the : to a ; in the third line. (obviously it was a spelling error). Thank you soo much!! Link to comment https://forums.phpfreaks.com/topic/57094-solved-center-it/#findComment-282605 Share on other sites More sharing options...
pikemsu28 Posted June 26, 2007 Share Posted June 26, 2007 my bad on the spelling mistake, glad it worked for ya Link to comment https://forums.phpfreaks.com/topic/57094-solved-center-it/#findComment-283000 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.