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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Css questions.

Status
Not open for further replies.
Apr 9, 2007
16
US
Im from a table background, and beginning to learn CSS.

I have a container div and another div called divB.
I then place divB inside the container.

Now I keep adding text to divB, and theres a problem. the divB will stretch its width and go outside the container div boundary instead of going to a new line and wrap the text inside the divB box itself.

How do I fix this?
also, if I keep stretching the divB height with "<br/>",
how can I make the container stretch its height also to complement each other? thanks.


 
It is almost impossible to advise you without seeing the code. What you describe as wanted result should be happening but you must have something in your code preventing it. If you show us the code, we could identify what that is.

___________________________________________________________
[small]Do something about world cancer today: PACT[/small]
 
We'd need to see the CSS that affects the container div and divB. Put together a minimal HTML page that shows your problem (remove all unnecessary code from that page - just the bare essentials).

Having said that, here's my guess: Make sure that divB is not positioned absolutely.

Cheers,
Jeff

[tt]Jeff's Page @ Code Couch
[/tt]

What is Javascript? FAQ216-6094
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top