Forums

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

Home Forums CSS 100% height again

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #24101
    Oskar
    Participant

    Hi all,

    I didn’t use to have any problems with this but now I do, can’t make it work in anything but IE7 – the irony!

    Code:
    html, body { height: 100%;}
    .container {height:auto !important; height:100%; min-height:100%; }
    .container .box { height: 100%;}

    The .container works just fine it seems but I can’t get the .box to get it as well. What am I missing?

    Thanks a lot,
    Oskar

    #53707
    Oskar
    Participant

    Hm, just found this:

    Quote:
    div { min-height: 100% }

    and two nested divs <body> <div><div> </div></div> </body>

    The result is that inner div is not 100% of body.

    The reason is because ‘height’ is not explicitly defined for the outer div, so the percentage in the inner is calculated to ‘auto’.

    Which actually makes sense. Guess I need to rethink my html-layout.

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