shake
09 Jul 2009, 07:34 PM
i am laying out a webpage via css and for some reason the 'margin-top' property that i added to one element is moving the entire page contents down. below is the code:
----------html-----------
<body>
<div id="wrapper">
<div id="navigation"> <a href="index.html">home</a> <a href="news.html">news</a> <a href="portfolio.html">portfolio</a> <a href="recent.html">recent work </a> <a href="contact.html">contact</a> </div>
<div id="content">
<div id="contentBox">Content for id "contentBox" Goes Here</div>
</div>
<div id="footer">(c) 2009 evanfarinholt.com</div>
</div>
</body>
---------------css---------
#wrapper {
height: auto;
width: 700px;
margin-top: 35px;
margin-right: auto;
margin-bottom: 50px;
margin-left: auto;
}
#wrapper #navigation {
height: 22px;
background-color: #000000;
border-left-width: 3px;
border-left-style: solid;
border-left-color: #FFFFFF;
}
a {
padding-left: 10px;
padding-right: 10px;
}
a:link, a:visited {
color: #FFFFFF;
text-decoration: none;
background-color: #000000;
}
a:hover, a:active {
background-color: #FFFFFF;
color: #000000;
text-decoration: none;
}
#wrapper #bodyPic {
height: 554px;
}
#wrapper #bottomContent {
background-color: #000000;
height: 150px;
border-left-width: 3px;
border-left-style: solid;
border-left-color: #FFFFFF;
}
#wrapper #newsContent {
height: 500px;
border-left-width: 3px;
border-left-style: solid;
border-left-color: #FFFFFF;
}
#wrapper #footer {
background-color: #000000;
height: 20px;
color: #CCCCCC;
font-size: 13px;
text-align: center;
border-left-width: 3px;
border-left-style: solid;
border-left-color: #FFFFFF;
}
#wrapper #content {
height: 800px;
background-color: #000000;
border-left-width: 3px;
border-left-style: solid;
border-left-color: #FFF;
margin-top: 0px;
}
#wrapper #content #contentBox {
height: 250px;
width: 600px;
margin-top: 20px;
margin-right: auto;
margin-bottom: 20px;
margin-left: auto;
}
------------------
unfortunately i can't show a picture of what the page looks like, but any help would be much appreciated.
Thanks,
shake
----------html-----------
<body>
<div id="wrapper">
<div id="navigation"> <a href="index.html">home</a> <a href="news.html">news</a> <a href="portfolio.html">portfolio</a> <a href="recent.html">recent work </a> <a href="contact.html">contact</a> </div>
<div id="content">
<div id="contentBox">Content for id "contentBox" Goes Here</div>
</div>
<div id="footer">(c) 2009 evanfarinholt.com</div>
</div>
</body>
---------------css---------
#wrapper {
height: auto;
width: 700px;
margin-top: 35px;
margin-right: auto;
margin-bottom: 50px;
margin-left: auto;
}
#wrapper #navigation {
height: 22px;
background-color: #000000;
border-left-width: 3px;
border-left-style: solid;
border-left-color: #FFFFFF;
}
a {
padding-left: 10px;
padding-right: 10px;
}
a:link, a:visited {
color: #FFFFFF;
text-decoration: none;
background-color: #000000;
}
a:hover, a:active {
background-color: #FFFFFF;
color: #000000;
text-decoration: none;
}
#wrapper #bodyPic {
height: 554px;
}
#wrapper #bottomContent {
background-color: #000000;
height: 150px;
border-left-width: 3px;
border-left-style: solid;
border-left-color: #FFFFFF;
}
#wrapper #newsContent {
height: 500px;
border-left-width: 3px;
border-left-style: solid;
border-left-color: #FFFFFF;
}
#wrapper #footer {
background-color: #000000;
height: 20px;
color: #CCCCCC;
font-size: 13px;
text-align: center;
border-left-width: 3px;
border-left-style: solid;
border-left-color: #FFFFFF;
}
#wrapper #content {
height: 800px;
background-color: #000000;
border-left-width: 3px;
border-left-style: solid;
border-left-color: #FFF;
margin-top: 0px;
}
#wrapper #content #contentBox {
height: 250px;
width: 600px;
margin-top: 20px;
margin-right: auto;
margin-bottom: 20px;
margin-left: auto;
}
------------------
unfortunately i can't show a picture of what the page looks like, but any help would be much appreciated.
Thanks,
shake