Tuesday, October 12, 2010

CSS Float

CSS float property lets you decide where to place an element relative to other elements on the page. When using the float property, other elements simply wrap around the item you have applied to float.

Example code:
<div style="width:250px;">
<h1 style="float:left;margin-right:20px;">Text float</h1>
<p>If your browser supports CSS float property, this text will flow around the position. If this does not seem to work, could be a browser compatibility thing ...</p>
</div>

This results in:

Text float

If your browser supports CSS float property, this text will flow around the position. If this does not seem to work, could be a browser compatibility thing ...

No comments:

Post a Comment