Grow your CSS skills. Land your dream job.

How to make an area expand to accomodate text

  • # November 25, 2009 at 8:03 pm

    I have a pretty simple site that I possibly need some of the sub-pages to expand to make room for more text. Do I use percentages for the div height? This site is built with a top, a centered nav, a header area, the body and the footer. I want everything to stay the same size except for the body area. Can someone point me to examples of this type of layout? Or articles?
    Thanks in advance!

    Rob
    # November 26, 2009 at 5:27 am

    Do you have a live link?

    Normally people would use height:auto; overflow:hidden; – and that grows the containing div, but a live link would be really useful :)

    # November 26, 2009 at 12:28 pm

    A div, in its essence, is design to expand with content. If the div isn’t expanding, it’s probably due to the fact that it has a set height.

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

You must be logged in to reply to this topic.

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