Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CSS Background not growing with text

Status
Not open for further replies.

jedel

Programmer
Jan 11, 2003
430
AU
If you could go to this page, it will show what My problem is.

Basically I have a Container Div tag with an id called "Container" on it.

No matter what I try, I cannot get the background to grow with the text inside the container Div. The main body of text has its own Div tag and I've tried all of the settings for this still to no avail.

If I take away the height setting from the container CSS, the entire background disappears altogether.

How do I get the Container div tag and it's background to grow with the text and Div tags that are contained within it???

-------------------------------------------------------------
"The most overlooked advantage of owning a computer is that if they foul up there's no law against whacking them around a bit."
 
You need to sort out the validation problems with your code first...


I can't see the problem at a casual glance - so assume it could have something to do with your markup problems.

Cheers,
Jeff

[tt]Visit my blog [!]@[/!] Visit Code Couch [!]@[/!] [/tt]

Make sure your web page and css validates properly against the doctype you have chosen - before you attempt to debug a problem!

FAQ216-6094
 
I found the problem.

While your Doctype and validation of the code is something that should be done, I have very rarely found it an issue in things like this. I have validated the page by the way, thanks for that.

The problem was that there is needed a clearfloat Div as the last tag in the child divs located inside the container. This tells the container to cover all of the child divs as well.

-------------------------------------------------------------
"The most overlooked advantage of owning a computer is that if they foul up there's no law against whacking them around a bit."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top