htmlcssalignment

right align an image using CSS HTML


How can I right-align an image using CSS.

I do not want the text to wrap-around the image. I want the right aligned image to be on a line by itself.


Solution

  • <img style="float: right;" alt="" src="http://example.com/image.png" />
    <div style="clear: right">
       ...text...
    </div>    
    

    jsFiddle.