srule_
07-05-2007, 07:19 PM
Hey, My 1st post, ya!
anyway, i'm having a problem with my css layout.
1. In firefox my nav bar goes out of the "container div". I tryed making the width smaller but then it does not center good as there is an extra 40px on the left.
2. In ie6 my content divs clash making the left hand one drop. also the footer div is to big.
if u want to view the problems then this is the web page: http://forestlakes.50webs.com/index.htm
HTML Code:
<body>
<div id="wrapper">
<div id="container">
<div id="header">
</div>
<div id="nav">
<ul class="nav">
<li><a href="http://www.google.ca">Calander </a></li>
<li><a href="http://www.google.ca"> Workshop </a></li>
<li><a href="http://www.msn.com"> Volunteer </a></li>
<li><a href="http://www.newschoolers.com"> What's Next </a></li>
<li><a href="http://www.google.ca"> Contact Us </a></li>
<li><a class="end" href="http://www.newschoolers.com"> Forest Lake Map </a></li>
</ul>
</div>
<div id="contentleft">
</div>
<div id="contentright">
</div>
<div id="footer">
</div>
</div>
</div>
</body>
CSS Code
body {
margin: 0px;
padding: 0px;
font-family:Verdana, sans-serif;
font-size:12px;
}
#wrapper {
width:760px;
margin: 0 auto 0 auto;
}
#container {
float:left;
width:760px;
border:1px solid black;
background-color:#b1d07f;
}
#header {
width:760px;
background: url(images/Headerbg.gif) top left no-repeat;
height:198px;
}
ul.nav {
list-style:none;
width: 780px;
background-color:#e8e8e8;
text-align: center;
margin-top:0px;
padding-top:5px;
padding-bottom:5px;
margin-left:-20px;
}
ul.nav li {
display: inline;
}
a.end {
border-right: 1px solid black;
padding-right: 5px;
padding-left: 5px;
}
ul.nav a{
border-left: 1px solid black;
font-weight:bold;
text-decoration:none;
padding:5px;
text-align: center;
color:#000000;
}
ul.nav a:hover {
color:#FFFFFF;
background-color:#000000;
}
#contentleft {
width: 350px;
float: left;
border:2px solid #b6dc86;
margin-top: 20px;
margin-left: 20px;
padding-top: 20px;
}
#contentright {
width: 350px;
float: right;
border:2px solid #b6dc86;
margin-top: 20px;
margin-right: 20px;
padding-top: 20px;
}
#footer{
border:2px solid #b6dc86;
margin-top: 20px;
margin-left: 20px;
margin-bottom: 20px;
padding-top: 20px;
width: 720px;
float: left;
}
anyway, i'm having a problem with my css layout.
1. In firefox my nav bar goes out of the "container div". I tryed making the width smaller but then it does not center good as there is an extra 40px on the left.
2. In ie6 my content divs clash making the left hand one drop. also the footer div is to big.
if u want to view the problems then this is the web page: http://forestlakes.50webs.com/index.htm
HTML Code:
<body>
<div id="wrapper">
<div id="container">
<div id="header">
</div>
<div id="nav">
<ul class="nav">
<li><a href="http://www.google.ca">Calander </a></li>
<li><a href="http://www.google.ca"> Workshop </a></li>
<li><a href="http://www.msn.com"> Volunteer </a></li>
<li><a href="http://www.newschoolers.com"> What's Next </a></li>
<li><a href="http://www.google.ca"> Contact Us </a></li>
<li><a class="end" href="http://www.newschoolers.com"> Forest Lake Map </a></li>
</ul>
</div>
<div id="contentleft">
</div>
<div id="contentright">
</div>
<div id="footer">
</div>
</div>
</div>
</body>
CSS Code
body {
margin: 0px;
padding: 0px;
font-family:Verdana, sans-serif;
font-size:12px;
}
#wrapper {
width:760px;
margin: 0 auto 0 auto;
}
#container {
float:left;
width:760px;
border:1px solid black;
background-color:#b1d07f;
}
#header {
width:760px;
background: url(images/Headerbg.gif) top left no-repeat;
height:198px;
}
ul.nav {
list-style:none;
width: 780px;
background-color:#e8e8e8;
text-align: center;
margin-top:0px;
padding-top:5px;
padding-bottom:5px;
margin-left:-20px;
}
ul.nav li {
display: inline;
}
a.end {
border-right: 1px solid black;
padding-right: 5px;
padding-left: 5px;
}
ul.nav a{
border-left: 1px solid black;
font-weight:bold;
text-decoration:none;
padding:5px;
text-align: center;
color:#000000;
}
ul.nav a:hover {
color:#FFFFFF;
background-color:#000000;
}
#contentleft {
width: 350px;
float: left;
border:2px solid #b6dc86;
margin-top: 20px;
margin-left: 20px;
padding-top: 20px;
}
#contentright {
width: 350px;
float: right;
border:2px solid #b6dc86;
margin-top: 20px;
margin-right: 20px;
padding-top: 20px;
}
#footer{
border:2px solid #b6dc86;
margin-top: 20px;
margin-left: 20px;
margin-bottom: 20px;
padding-top: 20px;
width: 720px;
float: left;
}