masteringprojects
masteringprojects

Reputation: 143

there is no clear:top;?

There is NO clear:top :( so I was wondering if there is a clear solution for that:

<div style="clear:right;float: right;">right</div>
<div style="clear:right;float: right;">right</div>
<div style="clear:right;float: right;">right</div>
<div style="clear:right;float: right;">right</div>
<div style="clear:left;float: left;">I want this to be on TOP left side without using div nor margin minus</div>

live example :

http://jsfiddle.net/puaction/qS7v2/

so the left div will be on the left side BUT on top not on bottom WITHOUT using div nor minus margin.

You can see exactly why I need it so badly here :

http://pua.puaction.com/

Upvotes: 0

Views: 100

Answers (2)

Gal Margalit
Gal Margalit

Reputation: 5844

In addition to drinchev answer, it's a better practice to use inline-block (instead of float), for clear look for "clear fix".

Upvotes: 1

Ivan Drinchev
Ivan Drinchev

Reputation: 19591

You just need to render your div before any divs that have floats to the right.

In this case :

<div style="clear:left;float: left;">I want this to be on TOP left side without using div nor margin minus</div>
<div style="clear:right;float: right;">right</div>
<div style="clear:right;float: right;">right</div>
<div style="clear:right;float: right;">right</div>

And on your website you should place div#sliderwrap before div#boxreg

Upvotes: 1

Related Questions