Tools, FAQ, Tutorials:
Floating an Image to the Right Side in HTML
How To Float an Image to the Right Side?
✍: FYIcenter.com
If you want to float an image to the right side of the paragraph
instead of inline within a text line, you have to use the CSS property
"float" to do this. The "float" property takes two values:
Here is a tutorial example with an image floated to the right side:
<?xml version="1.0" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title>Floating Image</title> </head> <body> <h4>Inline Images</h4> <p style="background-color: #eeeeee; padding: 8px;"> <img src="/moonrise.jpg" alt="Moonrise" width="69" height="91" style="float: right"/> "Moonrise" is a very simple to use, yet very accurate program. If you put it in your Startup folder, it will greet you everyday with the day's sunrise, sunset, moonrise, moonset, and twilight times.</p> </body> </html>
If you save the above document as floating_image.html, and view it with Internet Explorer, you will see an image floated to the right side of the paragraph as shown below:
⇐ Reducing the Display Size of an Image in HTML
2017-03-27, 1608🔥, 0💬
Popular Posts:
Can Two Forms Be Nested? Can two forms be nested? The answer is no and yes: No. You can not nest two...
How to add request query string Parameters to my Azure API operation to make it more user friendly? ...
How To Create an Array with a Sequence of Integers or Characters in PHP? The quickest way to create ...
What is EPUB 3.0 Metadata "dcterms:modified" property? EPUB 3.0 Metadata "dcterms:modified" is a req...
dev.FYIcenter.com is a Website for software developer looking for software development technologies,...