Jump to content

Tip with CSS div positioning


Vetruvet
 Share

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...