With the HTML you have, this is not possible.
The flow of the document is in HTML order. This means that under normal circumstances, an element can only affect elements that appear after it in HTML as much as possible.
float: right , for example, will move an element to the right, and all elements following it will pass around it to the left. clear: left will not allow elements to flow to the left of the element to which it is applied.
I could suggest breaking your HTML into blocks and float:
<ul> <li> <h3>Title</h3> <div class="content"> <img src="images/image" /> <p>This is some text.</p> <p>Here some more text.</p> <p>And heres yet another block of text.</p> </div> <blockquote>This is a quote.</blockquote> <a>A link</a> </li> </ul>
Then you can remove the selector and the h3, img, p rule from your CSS and replace it with a similar rule for .content
ul { width: 200px; } .content { float: left; width: 100px; } blockquote { float: right; width: 50px; } a { float: left; clear: both; }
In general, I would recommend reading through the flow of a document, float , clear and position . They are generally overused properties, and it looks like you used them here.
Oh and the fiddle for you: http://jsfiddle.net/2bedr/1/
source share