Forums

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

Home Forums CSS ‘DIV’ that takes up the height of the browser

  • This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #37742
    djpic
    Participant

    Hello,

    I need to know if there is a way in CSS to make the height of a ‘div’ the same height as the brewer window? I have tried height of 100%, but of course that doesn’t work. Any ideas?

    #101605
    cizmic
    Participant

    Why didn’t 100% work? Can you give me the code or result?

    #101607
    djpic
    Participant

    Here is a quick demo of sort of what I want to do.

    Your text to link…

    #101608
    cizmic
    Participant

    Try using

    html, body {
    height: 100%;
    }

    That should fix it.

    #101609
    djpic
    Participant

    Well, that worked….Thanks! I did try the body 100% by itself but didn’t work. I guess you need the HTML as well. Any idea why you need both?

    #101612
    cizmic
    Participant

    Because in browsers, the html tag is considered as a block element.

    #101613
    djpic
    Participant

    Oh yes, of course, thanks.

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