Steve, you're referring to an old method of clearing floats:
http://www.positioniseverything.net/easyclearing.html
It enables an unfloated container to expand to to enclose a floated
box.
For another solution to this problem, see 
http://www.quirksmode.org/css/clearing.html
and http://www.sitepoint.com/blogs/2005/02/26/simple-clearing-of-floats/

Michael, it's hard to say what you're trying to achieve without seeing
your markup. What do you mean by "the
other (below) elements then don't adjust their position accordingly"?
Try learning a bit more about floats.  An oldie, but a goodie:
http://css.maxdesign.com.au/floatutorial/


You could be after either of these layouts:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd";>

<html lang="en">
<head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <title>untitled</title>
        <style type="text/css" media="screen">
                #container {
                        width: 1000px;
                }
                #small {
                        width:200px;
                        height:200px;
                        border: 1px solid red;
                        float:right;
                }
                #large {
                        border: 1px solid black;
                        width:600px;
                        height:600px;
                }
                #next {

                        border: 1px solid orange;
                }
        </style>
</head>
<body>
<div id="container">
<div id="small">small div</div>
<div id='large'>big div</div>
<div id="next">further content below the small and big div</div></div>
</body>
</html>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd";>

<html lang="en">
<head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <title>untitled</title>
        <style type="text/css" media="screen">
                #small, #next {
                        width:200px;
                        float:right;
                        clear: right;
                }
                #small {
                        border: 1px solid red;
                }
                #next {
                        border: 1px solid orange;
                }
                #large {
                        border: 1px solid black;
                        width:600px;
                        height:600px;
                }

        </style>
</head>
<body>

<div id="small">small div</div>
<div id="next">further content below the small div</div>
<div id='large'>big div</div>
</body>
</html>



--~--~---------~--~----~------------~-------~--~----~
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]
-~----------~----~----~----~------~----~------~--~---

Reply via email to