Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Why is this not full height?

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #149365
    SilverSerpent
    Participant

    I have this Codepen here, and I am trying to make both columns take up the full height of their container. However, no matter what I change the height percentage of the sidebar to, the height never changes. Is there something I’m missing?

    #149369
    Paulie_D
    Member

    It’s because they are 100%..of themselves when floated.

    You might want to look into options other than floats …like display:table-cell.

    http://codepen.io/Paulie-D/pen/pHeiw

    It has it’s gotchas (just like floats and inline-block)…but it does have it’s uses….and you don’t need to clear them.

    #149370
    SilverSerpent
    Participant

    Thanks! I didn’t know that functionality changes when things are floated.

    #149372
    Senff
    Participant

    Giving an element a 100% height will only work when the parent element has a specific height assigned to it. So, as soon as you give main a fixed height, the sidebar will be the same height.

    But in this case, you probably don’t want the main block to have a fixed height.

    #149385
    SilverSerpent
    Participant

    Ah gotcha, I didn’t know that

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.