Floats are basically the same as the align attribute. They are super easy to use!

CSS Code

#left {

float: left;

}

#right {

float: right;

}

XHTML Code

<div id=”left”>This text will appear on the left hand side of the page.</div>

<div id=”right”>This text will appear on the right hand side of the page.</div>

CSS Explanation

  • #left – # is the symbol used to name an ID. Left is the name of the ID.
  • float: left; – Basically says which way the content will move or float. In this case left.

XHTML Explanation

  • <div id=”left”> – Telling the div what id it will use.
  • </div> – End tag for the div.