PDA

View Full Version : CSS- problems with bordered box



mickapoo
15 Sep 2008, 09:51 PM
First of all, thanks for your help. My page is http://www.improveyourwebvisibility.com/GeneLeaders. If you look right under the heading "Welcome to Geneleaders.com", you will see a bordered box (it's really light, but it's there) that contains the text, "On this website right here...".

What I would like to know is how to extend the height of that bordered box so it expands to fit that text that is there. Currently, the text is expanding way beyond the bottom of that bordered box. The text itself is fine, I'm just not sure how to extend the box.

Thank you so much in advance!

Wickham
16 Sep 2008, 10:29 AM
Your link doesn't work so I'm just giving general advice.

The way to get a div to expand to suit the text inside is not to give it a height; it will expand to suit the content and can then expand more if someone increases text size and if there is room. This won't work all the time, but will if nothing else is stopping the div from expanding down.

If you have a background color or image in the div without a height but with a float, you may have to use special code that drags the background down as floated divs are assumed to have no height, but it seems that this is not your problem.