Grow your CSS skills. Land your dream job.

Height 100%

  • # January 26, 2013 at 3:25 pm

    **Hi**

    I know this is a trivial question, but I’ve so much time reading tutorials and trying different code snippets.

    _menu-bg_ is my div class that needs to be 100% high. But somehow it seems that the html or body only is 526px high.

    Can anyone tell me what I’m missing ?

    # January 26, 2013 at 3:35 pm

    You need to set 100% height on every parent of menu-bg for it to work.

    # January 26, 2013 at 3:53 pm

    **rosspenman** -> Thanks for the reply. I have written _height: 100%;_ for all the parent divs (I think so), but it’s not working.

    I’ve fixed it, by adding a background to the menu-bg div. Not a perfect fix, but it works.

    Thanks again

    # January 26, 2013 at 6:53 pm

    @madsrh, you need to make html and body 100% too, and set menu-bg to min-height: 100%

    http://codepen.io/ChrisPlz/pen/uaFqp

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".