WordPress.org

Ready to get started?Download WordPress

Forums

Set height to 100% (3 posts)

  1. mpwelton
    Member
    Posted 2 years ago #

    I am putting together a small site for someone at
    http://www.jdeplumbingandheating.co.uk
    I have built a very basic custom template - header/posts/sidebar/footer - and would like to make the height of the 'posts' <div> to be 100% of the available space.

    So far without success.

    I have put the stylesheet code here:

    http://www.jdeplumbingandheating.co.uk/stylesheet.txt

    Any ideas?

  2. jmag
    Member
    Posted 2 years ago #

    The easiest way to get full height is

    #content {
          position:absolute;
          top:0;
          bottom:0;
      }

    You can also use the position:fixed, but that will not scroll with the window.

  3. CyberAlien
    Member
    Posted 2 years ago #

    You are missing this:
    html { height: 100%; }

    It won't help you though because setting 100% height to element sets it to full height of parent element, not parent element's content. Absolute positioning won't help you ether because it will mess up layout if post's content requires more height than is available to it.

Topic Closed

This topic has been closed to new replies.

About this Topic