Glubase - share your knowledge


All / Computers / Programming / CSS





  • View Command

CSS Reference

CSS float definition

Syntax

float: left | right | none

Description

The float property allows elements to wrap text around the element.

 

Value Description
none This is the default value. The element will appear where it appears in the document.
left The element floats to the left in the parent element.
right The element floats to the right in the parent element.

 

Example

[Try this example yourself]
<style type="text/css">

img 
{
  float:right
}

</style>

<p>
  <img src="http://www.glubase.com/images/glubase2.gif" />
  In this example paragraph we have a picture floating to the right of this text. 
  In this example paragraph we have a picture floating to the right of this text. 
  In this example paragraph we have a picture floating to the right of this text. 
  In this example paragraph we have a picture floating to the right of this text. 
  In this example paragraph we have a picture floating to the right of this text. 
  In this example paragraph we have a picture floating to the right of this text. 
</p>

Output

In this example paragraph we have a picture floating to the right of this text. In this example paragraph we have a picture floating to the right of this text. In this example paragraph we have a picture floating to the right of this text. In this example paragraph we have a picture floating to the right of this text. In this example paragraph we have a picture floating to the right of this text. In this example paragraph we have a picture floating to the right of this text.

  • Comments

No comments added.