Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Jul 2007
    Posts
    571
    Thanks
    25
    Thanked 28 Times in 28 Posts

    Firefox & ie6 display problems.

    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:
    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
    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;
    }
    Last edited by srule_; 07-05-2007 at 07:23 PM.

  • #2
    Regular Coder Jutlander's Avatar
    Join Date
    Jun 2007
    Location
    In my own sick little world :P
    Posts
    425
    Thanks
    1
    Thanked 12 Times in 12 Posts
    Remove the line marked in red:

    Code:
    ul.nav {
    list-style-type: none;
    background-color:#e8e8e8;
    text-align: center;
    margin-top:0px;
    padding-top:5px;
    padding-bottom:5px;
    margin-left:-20px;
    }
    Switch out your #contentright with this instead:

    Code:
    #contentright {
    width: 350px;
    float: left;
    clear: right;
    border:2px solid #b6dc86;
    margin-top: 20px;
    margin-right: 20px;
    padding-top: 20px;
    }
    I have floated it left and cleared it right. As a last thing you might want to add some right margin to #contentleft.
    .
    .

  • #3
    Regular Coder Jutlander's Avatar
    Join Date
    Jun 2007
    Location
    In my own sick little world :P
    Posts
    425
    Thanks
    1
    Thanked 12 Times in 12 Posts
    OK, after later testing I found out that would cause some trouble. I've reworked your layout a little. Try it out.

    HTML:

    Code:
    <body>
    
    <div id="wrapper">
    
        <div id="header"></div>
    	
          	<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 id="contentwrap">
    		
        <div id="contentleft">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor 
    incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis 
    nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. 
    Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu 
    fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in 
    culpa qui officia deserunt mollit anim id est laborum.</div>
        <div id="contentright">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor 
    incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis 
    nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. 
    Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu 
    fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in 
    culpa qui officia deserunt mollit anim id est laborum.</div>
    	<div id="footer">Some info here</div>
    </div>
    </div>
    
    </body>
    CSS:

    Code:
    * {
    margin: 0;
    padding: 0;
    }
    
    body {
    font-family:Verdana, sans-serif;
    font-size:12px;
    }
    
    #wrapper {
    width: 720px;
    margin: 0 auto;
    border:1px solid black;
    background-color:#b1d07f;
    }
    
    #contentwrap {
    padding: 20px;
    }
    
    #header {
    background: url(images/Headerbg.gif) top left no-repeat;
    height:198px;
    }
    
    ul.nav {
    list-style-type: none;
    background-color:#e8e8e8;
    text-align: center;
    margin-top:0px;
    padding-top:5px;
    padding-bottom:5px;
    }
    
    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 {
    float: left;
    border:2px solid #b6dc86;
    width: 305px;
    margin-bottom: 20px;
    margin-top: 20px;
    padding: 10px;
    }
    
    #contentright {
    float: right;
    clear: right;
    border:2px solid #b6dc86;
    width: 305px;
    margin-bottom: 20px;
    margin-top: 20px;
    padding: 10px;
    }
    
    #footer{
    border:2px solid #b6dc86;
    clear: both;
    }
    .
    .

  • #4
    Regular Coder
    Join Date
    Jul 2007
    Posts
    571
    Thanks
    25
    Thanked 28 Times in 28 Posts
    Thanks, it works great!!

    wish i could fix stuff like this myself as i always run into the same problems...


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •