SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict Braveheart4's Avatar
    Join Date
    Nov 2005
    Location
    Macedonia
    Posts
    368
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question problem with positioning

    I have a problem with nested <div> tags, the #navBar and the #text appear to be outside the #content's height, they don't respect the height inheritance of the #content. Is something wrong with the float property or something else?
    Here is the CSS:

    #content {
    height: inherit;
    }
    #navBar {
    height: inherit;
    float: left;
    }
    #text {
    height: inherit;
    float: right;
    }


    Here is the HTML code:

    <div id="content">
    <div id="navBar"></div>
    <div id="text"></div>
    </div>

  2. #2
    Non-Member
    Join Date
    Jan 2005
    Location
    Netherlands
    Posts
    4,300
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello

    FF NS Moz OP need the floats cleared and IE needs haslayout

    head+body #content:after{
    content: ".";
    display: block;
    height:0;
    clear: both;
    visibility: hidden;
    }
    * html #content{height:1%;}


Bookmarks

Posting Permissions

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