I have tried everything!!! No matter what I do, I have a white space at the top of my page in-between a div and the top. http://www.news-string.com/index2.html What is going on??
Try this style: <style type="text/css"> div#container { background-color: #EFF4F3; border-color:#000000; border-style:solid; border-width:0 7px; margin:0 auto; min-height: 1000px; width:950px; } div#header { background-color: #EFF4F3; } div#header h1 { padding:0px 0 0 30px; line-height:.5em; } div#header img { padding:0px 0 0 30px; } div#header ul { padding:10px 10px 10px 30px; text-transform:uppercase; font-family:arial,verdana,helvetica,sans-serif; font-size:11px; color:#FFFFFF; background-color:#000000; border-bottom: 7px solid; border-color:#496964; margin: 0px; } div#header li { display:inline; margin:0 26px 0 0; } div#box { height:200px; width:920px; background-color:#EFF4F3; margin-left:30px; } div.boxs1 { height:200px; width:295px; background-color:#FFFFFF; float:left; margin:5px; } body { background-color:#FFFFFF; margin: 0px; padding: 0px; } h1 { padding:0 30px 0 30px; color:545274; } p { font-family:"Times New Roman"; font-size:20px; } div#main { background-color:#EFF4F3; } div#postarea { width:604px; min-height:500px; margin-left:30px; margin-top:20px; float:left; background-color:#FFFFFF; } div#sidebar { width:295px; min-height:500px; float:left; margin-left:10px; margin-top:20px; background-color:#FFFFFF; } div#footer { background-color:#000000; height:400px; width:100%; margin:0 auto; min-height: 200px; width:950px; border-color:#000000; border-style:solid; border-width:0 7px; } </style> Code (markup): I have only added margin: 0px; to div#header ul and margin: 0px; padding: 0px; to body.
You could always just do margin-top:-10px in the body tag. I'm very new to web design but I've used it before without any problems.
It works thanks ... I still don't understand why I have to do that though. Shouldn't the margin automatically be set to 0?
I know that you need to set the margin to 0 to fix the problem but I am wondering why you need to do that? Shouldn't the margin be set to that automatically?