CSS float problems

Soldato
Joined
18 Apr 2004
Posts
2,613
Location
London
A friend is having some problems with his website and as its moderated registration I said i would see if any one could help on here....

As you can see on http://prsdesigns.net/website/index.php, my design is messed up.

the problem i am having is when using floats the container it is in does not count the following DIV as part of its contents, and therefore does not increase etc. see my screenshot for what i mean.

if anyone could give me some advice as this is the only problem i am having, it would be very much apreciated.

Screenshot 1
Screenshot 2
 
The way I do it (or seem to remember doing it in the past) is by putting a <div style="clear: both">&nbsp;</div> under the floated elements, just before the container div is closed, to 'pull' the container div around this one. It then covers the whole lot. I think ;)
 
Last edited:
huppy said:
The way I do it (or seem to remember doing it in the past) is by putting a <div style="clear: both">&nbsp;</div> under the floated elements, just before the container div is closed, to 'pull' the container div around this one. It then covers the whole lot. I think ;)

"i have put echo "<div style=\"clear: both\">&nbsp;</div>"; below both floated div's, but it still hasnt done anything to the page design. the design just stays at 100% of the visible page"
 
hmm it works for me - remove all of the height: 100% and min-height: 100% parts of the css, (from the html, body and #wrap) then put the above <div> in at the bottom, like so:

Code:
</div>
<div style="clear: both">&nbsp;</div>
</div>

<!--<div id="footer"></div>
<div id="pagebottom"></div>-->

</body>

</html>

Should be how the page finishes.
 
Back
Top Bottom