Difference between revisions of "CSS GUIDE FLOAT"

From CDOT Wiki
Jump to: navigation, search
(Usage Examples)
(Usage Examples)
Line 39: Line 39:
 
   <head>
 
   <head>
 
   <style type="text/css">
 
   <style type="text/css">
     img
+
     b
 
     {
 
     {
       float:right
+
      font-size: 25px;
 +
       float:right;
 
     }
 
     }
 
   </style>
 
   </style>
 
   </head>
 
   </head>
 
   <body>
 
   <body>
  <img src="logocss.gif" width="95" height="84" />
+
  <p>
 +
    <b>HELLO!</b>
 
     This is some text. This is some text. This is some text.
 
     This is some text. This is some text. This is some text.
 
     This is some text. This is some text. This is some text.
 
     This is some text. This is some text. This is some text.
Line 57: Line 59:
 
     This is some text. This is some text. This is some text.
 
     This is some text. This is some text. This is some text.
 
     This is some text. This is some text. This is some text.
 
     This is some text. This is some text. This is some text.
</p>
+
  </p>
 
  </body>
 
  </body>
 
  </html>
 
  </html>

Revision as of 18:16, 4 December 2006

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">
   b
   {
     font-size: 25px;
     float:right;
   }
  </style>
 </head>
 <body>

HELLO! This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text.

</body>
</html>

Notes

Specification Conformance

Browser Compatibility

Firefox,Netscape,Opera,IE

See Also

position