Can't get DIV height to 100%

T

timhaynes1985

Hi all, I have recently been building a site http://blindsya.awardspace.com
and am having problems with DIVS. I can't seem to get the content div
to the right of the menu to fill the gaping space below it. I have
tried height: 100% but to no avail. Does anyone have any
suggestions? I am grateful for any kind of help.
 
B

Ben C

Hi all, I have recently been building a site http://blindsya.awardspace.com
and am having problems with DIVS. I can't seem to get the content div
to the right of the menu to fill the gaping space below it. I have
tried height: 100% but to no avail.

Percentages are ignored when the container has an auto height.
Does anyone have any
suggestions? I am grateful for any kind of help.

It can be done with absolute positioning.

#wrapper { position: relative }

#content
{
position: absolute;
top: 0;
bottom: 0;
width: 100%;
}

But I don't really recommend this. If the contents of #content turn out
to be longer than the menus on the left, then they will overflow their
container.

Or you can use a table, or various other tricks (see
http://www.nrkn.com/3ColEqualPositioned/ for some ideas).

Or just get used to it looking the way the does. Generally speaking
trying to set the heights of things is not a good idea since you never
know how much height anything is going to take up (even if you know the
content, you don't know the user's font size or viewport width, and
content height usually depends on one or both of those things). Better
to leave heights as auto and just go with the flow. Choose your battles
carefully etc.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top