SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Thread: Float Probem?

  1. #1
    SitePoint Member delamatrix's Avatar
    Join Date
    Dec 2004
    Location
    Chicago
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Float Probem?

    I'm having an issue with some mock code I'm working on for a site for my client. I'm trying to get an element to display properly under another one. You can see my css code and design here:

    http://groq.delachi.com/css-test/csstest.html

    What I'm trying to do is get the <div id='navi-bar'> to sit right up under <div id='toolname'>. The 'navi-bar' div has an green border-bottom, but for some reason the border bottom shows right up under the 'toolname' div. Any ideas what I'm doing wrong?

    Thanks in advance,

    Delamatrix

  2. #2
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,596
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Hi, the parents have collapsed because the <li> are floated. They make hte parent collapse because it doesn't contain the floats. Make it do so
    Code:
    .navi-bar ul{overflow:hidden;}
    If you are doing a dropdown, use the clearfix instead .
    Always looking for web design/development work. Willing to do it cheap to build portfolio!

  3. #3
    SitePoint Member delamatrix's Avatar
    Join Date
    Dec 2004
    Location
    Chicago
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Ryan! Now the only problem is that my drop down sub menu seems to be trapped inside the div.

    -Delamatrix

  4. #4
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,596
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Read the lsat line of my post .
    Remove overflow:hidden; and set class="clearfix" on the <ul> (the top level one, not any others)

    Then add the CSs from this
    http://www.positioniseverything.net/easyclearing.html
    Always looking for web design/development work. Willing to do it cheap to build portfolio!

  5. #5
    SitePoint Member delamatrix's Avatar
    Join Date
    Dec 2004
    Location
    Chicago
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks again Ryan. I totally read right over that, sorry for being a bonehead. Yep, the clearfix worked. I appreciate your quick response and help.

    -Delamatrix

  6. #6
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,596
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    You're welcome . Any more questions just shout .
    Off Topic:

    Don't worry about reading over it, trust me, I've dealt with much worse (not that you were bad) since I've joined here
    Always looking for web design/development work. Willing to do it cheap to build portfolio!


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
  •