simple fire fox issue

Discussion in 'CSS' started by Funk-woo10, Apr 24, 2008.

  1. #1
    hi all,

    I have have have a problem in firefox, the background color or height of a div does not stretch down the contents inside the div - i will post the code.

    It works fine in internet exploder but not in firefox -

    
    <style type="text/css">
    <!--
    
    
    
    
    .sidebarcontents{
    width:150px;
    border-right: 1px solid #f3f3f3;
    border-left: 1px solid #f3f3f3;
    border-bottom: 1px solid #f3f3f3;
    border-top: 0px solid #f3f3f3;
    background-color:#f3f3f3;
    margin-bottom:10px;
    padding:10px;
    font-family:arial;
    font-size:14px;
    position:relative;
    }
    
    
    
    
    
    .sidebarlist{
    list-style:none;
    border: 1px solid #000;
    float:left;
    margin:0px;
    font-family:arial;
    font-size:14px;
    color:#000;
    
    
    }
    
    
    .sidebarlist li{
    padding-bottom:5px;
    list-style:none;
    
    }
    
    
    .sidebarlist li a{
    padding-bottom:0px;
    font-family:arial;
    font-size:14px;
    color:#0063dc;
    text-decoration:none;
    
    }
    
    .sidebarlist li a:hover{
    padding-bottom:0px;
    font-family:arial;
    font-size:14px;
    color:#0063dc;
    text-decoration:underline;
    
    }
    
    
    
    
    
    -->
    </style>
    
    
       <div class="sidebarcontents">
       <ul class="sidebarlist">
    <li><a href="http://***" title="***">***</a>
    <li><a href="http://***" title="***">***</a>
    <li><a href="http://***" title="***">***</a>
    <li><a href="http://***" title="***">***</a>
    <li><a href="http://***" title="***">***</a>
    <li><a href="http://***" title="***">***</a>
    <li><a href="http://***" title="***">***</a>
    <li><a href="http://***" title="***">***</a>
    <li><a href="http://***" title="***">***</a>
    <li><a href="http://***" title="***">***</a>
    <li><a href="http://***" title="***">***</a>
    <li><a href="http://***" title="***">***</a>
    <li><a href="http://***" title="***">***</a>
    <li><a href="http://***" title="***">***</a>
    </ul>
       </div>
    
    HTML:

     
    Funk-woo10, Apr 24, 2008 IP
  2. InfoSmith

    InfoSmith Peon

    Messages:
    884
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #2
    put div and ul together
     
    InfoSmith, Apr 24, 2008 IP
  3. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #3
    sidebarlist is floated. IE incorrectly stretched the container (sidebar) to contain the float. No other browsers do this-- they all act like FIrefox here.

    But you can tell those browsers to make the container wrap floats. Just be careful with it:

    .sidebarcontents {
    overflow: hidden;
    your other declarations;
    }
     
    Stomme poes, Apr 24, 2008 IP