Jump to content

Tip with CSS div positioning


Vetruvet

Recommended Posts

I found this helpful trick to use when working with positioning div's using CSS. This helps especially if you're using "float:right" or "float: left".If the div's have different heights, then any text below is put under the smaller div. To avoid that, just put in "<br clear="all" />" after the div's. It creates an "invisible line", so everything starts after BOTH div's.

Link to comment
Share on other sites

or alternatively don't use a br tag it doesn't make any difference you can apply a clear-float with whatever content comes next on the page. you can even clear a float with no added mark-up in your html. for more on that, read this: http://www.positioniseverything.net/easyclearing.html

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...