471,598 Members | 1,273 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,598 software developers and data experts.

Top margin problem (Container div has a standard 10px or so margin?)

Hi,

I've made a container div and put 2 div's inside of that for easy positioning..

The problem is that the container div has a standard 10px or so top margin which makes it go down too much.. Any idea how to fix this?

Here's my css :

[HTML]body {
background: #2b2b2b url(img/bg_image.gif) no-repeat top center;
font-family:Verdana, Arial, Helvetica, sans-serif;
color: #CCCCCC;
}

#container {
position: relative;
margin-left: auto;
margin-right: auto;
width: 553px;
margin-top: 0px;
padding: 0px;
}

#banner {
width: 553px;
height: 66px;
background: url(img/halobanner.gif) no-repeat top center;
}

#navbar {
width: 553px;
height: 20px;
margin-top: 6px;
text-align: center;
}

#content {
margin-top: 6px;
background:url(img/content.gif) repeat-y center;
height: 100%;
margin-left: auto;
margin-right: auto;
width: 565px;
}

body a:link, a:active, a:visited {
text-decoration: none;
color:#CCCCCC;
font-size:13px;
}

body a:hover {
color: #003300;
font-size:13px;
}

p {
font-family:Verdana, Arial, Helvetica, sans-serif;
color: #CCCCCC;
margin-left: 6px;
margin-bottom: 3px;
}[/HTML]

And the page is here : http://theclan-name.com/school/games
Nov 22 '07 #1
1 3404
drhowarddrfine
7,435 Expert 4TB
I don't see any top margin on your content div.

One note. I see you are using 'display:block' on a <div> but divs are block elements so that is unnecessary.
Nov 22 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by paulroskilly | last post: by
1 post views Thread by Miked | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by Anwar ali | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.