Edit

Float Right Example

The float left property is used to put the positioning of HTML content in left side.

Example of Code

<style type="text/css">
  .float-right {
    float: right;
    padding: 20px;
    margin: 0 0 10px 10px;
    background: gold;
  }
</style>
<body>
    <div class="float-right">
      Float right
    </div>
    <p>This text rearranges itself to flow around the element that is floated right. </p>
    <p>I added a margin to the left and bottom of the floated box so that this text doesn't run right up against it. Play around with the property values to see how it changes the layout.</p>
</body>

Output

   
      Float right   
   

This text rearranges itself to flow around the element that is floated right.

   

I added a margin to the left and bottom of the floated box so that this text doesn't run right up against it. Play around with the property values to see how it changes the layout.