Open main menu

CDOT Wiki β

CSS GUIDE FLOAT

Revision as of 17:04, 4 December 2006 by Dtolj (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This document is a work in progress and is subject to change.

Summary

Float CSS property defines the position where an image or text will be located in another element.

Syntax

float: [number]

Legal Values

Value Description
left The image or text moves to the left of the parent element
right The image or text moves to the right of the parent element
none Image or text does not move and it appears at the same location

Mozilla Recommended Values

Usage Examples

<html>
<head>
 <style type="text/css">
  div.x{
   position:absolute;
   left:0px;
   top:0px;
   font-size:80px;
   z-index:-1;
  }
  div.y{
   position:absolute;
   left:0px;
   top:10px;
   font-size:80px;
   color:red;
   z-index:1;
  }
 </style>
</head>

 <body>
  <div class="x">LAYER 1</div>
  <div class="y">LAYER 2</div>
 </body>
 
</html>

Notes

Specification Conformance

Browser Compatibility

Firefox,Netscape,Opera,IE

See Also