CSS3 > Float

Float in CSS3

How to float the element by using CSS?


Float

Float is an attribute used in the style tag to float the text to right and left of the webpage, it also the float the text and images to float to right and left side of the webpage   

 <p>Float</p>
    <p style="float:right">This is techfunda</p>
    <br />
    <p style="float:left">This is Dotnetfunda</p>

In the above code snippet we have the float element as right and left which isused to floats the element as right and left side

output

Image float

Image float floats the image to the right side and leftside of the webpage 

<p>Image float</p>
    <img src="aaple.jpg" style="float:left" height="80" width="70"/>
    <img src="images.jpg" style="float:right" height="80" width="70"/>

Image float

In the above code snippet we have defined the image to float to the right side and left side of the page

output

 

 Views: 3878 | Post Order: 119



Write for us






Hosting Recommendations