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 3 of 3
  1. #1
    New Coder
    Join Date
    Nov 2004
    Posts
    95
    Thanks
    0
    Thanked 0 Times in 0 Posts

    css aligning issue

    css code:
    Code:
    #container
    {
     width:795px;
     margin:0 auto 0 auto;
     border:1px solid black;
    }
    
    #header
    {
     height:55px;
     width:100%;
    }
    
    #navigation 
    {
     width:100%;
    }
    
    #left-float
    {
     float: left;
     width: 150px;
     border: 1px solid red;
    }
    
    #right-float
    {
     float: right;
     margin: 10px 10px 10px 10px;
     border: 1px solid orange;
    }
    page code:
    Code:
     <body>
      <div id="container">
       <div id="header">asdf</div>
       
       <div id="navigation">
        <div id="left-float">Left float!</div>
        <div id="right-float">Right float!</div> 
       </div>
      </div>
     </body>
    The container is supposed to hold everything and the navigation is supposed to hold to two floats.

    to view what issue i'm getting visit: www.techglo.net/office/index.php

  • #2
    Senior Coder
    Join Date
    Jul 2005
    Location
    UK
    Posts
    1,051
    Thanks
    6
    Thanked 13 Times in 13 Posts
    Works fine in IE, but no border in FF. Try putting a div with {clear: both;} containing a non breaking space under your two floats or alternatively a similar div under your navigation (but without clear both). To quote Aerospace_Eng, "firefox needs to be told there is still something in the container".

  • #3
    New Coder
    Join Date
    Nov 2004
    Posts
    95
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Pennimus
    Works fine in IE, but no border in FF. Try putting a div with {clear: both;} containing a non breaking space under your two floats or alternatively a similar div under your navigation (but without clear both). To quote Aerospace_Eng, "firefox needs to be told there is still something in the container".
    Hey, thanks for the help. I've made plenty of layouts like this without any problems. Half the time I forget to put the clear in and wonder why it's not working

    -Thanks


  •  

    Posting Permissions

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