Forums

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

Home Forums CSS Responsive Design – height

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #38928
    tobeeornot
    Member

    Sorry if this is a silly question but how do you set height of containers to be flexible and relative to the size of the device used? Do you simply convert pixels to percentages based on the parent container or is there more to it than that? I notice a lot of site don’t seem to set a height, apart from the body, at all.

    #106152
    tobeeornot
    Member

    @JoshWhite – so by that do you mean padding and margins at relative values form the shape of the containers?

    #106164
    Jeager
    Member

    Height in itself, as Josh said, is dynamic,. So if you put a paragraph in it, the element will be has high as the paragraph dictates. If you want to use a 100% height for something, you have to set the html, body, and any other parent to 100% height first.

    #106181
    tobeeornot
    Member

    So Overflow: hidden is the way to go.

    #147265
    denikian
    Participant

    Use

    position: fixed;
    height:100%;

    it’s work

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