Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Stretching div
- Luciano (DOC)
May 19, 2010, 12:41 pm
rate this thread
I have a div containing two block elements, one floating left and one
floating right. The div is contained into a general wrapper which is
centered in the body.
<div style="padding: 7px 0 7px 0; width: 100%;border: 1px solid red;">
<p style="width: 750px; float: left;border: 1px solid green;">blabla</p>
<form style="float:right; width: 200px; border: 1px solid
Why doesn't the div stretch, according to the elements it contains? What
does it inherit?
(of course if you cut & paste the code above into an empty page it works)