Stretching div

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

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)


Re: Stretching div

Op 19-5-2010 14:41, Luciano (DOC) schreef:
Quoted text here. Click to load it

You give us the code to one single div
and you seem to be aware that it may be a problem of inheritance.

Then why don't you give us a URL to the page in question?
That way we have all the information we need.


Re: Stretching div

Quoted text here. Click to load it

I just missed overflow:hidden on the container div.
Thanks anyway.


Site Timeline