Forums

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

Home Forums CSS Extending div height to bottom of page

  • This topic is empty.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #243224
    webasaur
    Participant

    I have a sidebar that I’m trying to extend so that it reaches the very bottom of the page, which it does to a point. I have html and body set to a height of 100% as well as the containing parents, and the sidebar itself set as 100vh. This makes it work to a point, but on pages that are especially long it stops at a certain point. Does anyone know a potential solution to this problem?

    #243225
    Paulie_D
    Member

    Set the sidebar to 100% height, if its parent is also 100% high (etc, etc) then that should do it.

    Otherwise, a Codepen.io demo of the issue would be ideal so we can see the actual issue.

    You might also use min-height:100% rather than just heighton the body.

    #243226
    bearhead
    Participant

    Here is a way you could do it with display:table
    http://codepen.io/kvana/pen/LZWQMo

    #243227
    webasaur
    Participant

    I can’t really demo the code because it’s a corporate project, but the idea is simplistic enough:

    http://codepen.io/anon/pen/Wxpzxd

    I tried using min-height and that had no effect, but thank you.

    #243228
    webasaur
    Participant

    Bearhead thank you as well, but it didn’t have any effect.

    #243234
    bearhead
    Participant

    Not sure what you did, my method seems to work as expected:
    https://codepen.io/kvana/pen/mEWxqW

    #243239
    AsGYakimov
    Participant

    What about using flexbox?

    #243240
    webasaur
    Participant

    Flex isn’t really an option as I suspect that most of the users won’t be using modern browsers. Thanks for the replies everyone, I’m guessing that the real problem lies somewhere else, I’ll just have to find it.

Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘CSS’ is closed to new topics and replies.