MoonPoint Support Logo

 


Shop Amazon Warehouse Deals - Deep Discounts on Open-box and Used ProductsAmazon Warehouse Deals



Advanced Search
May
Sun Mon Tue Wed Thu Fri Sat
 
7
     
2017
Months
May
Aug Sep
Oct Nov Dec


Sun, May 07, 2017 6:09 pm

Centering an image on a webpage horizontally

To center an image horizontally on a webpage, you can add style="display: block; margin: auto;" to the img tag. E.g.

<p> <img src="320px-Fisher_500_radio.jpg" alt="Fisher AM/FM radio from 1959" width="320" height="208" style="display: block; margin: auto;"> </p>

Fisher AM/FM radio from 1959

Related articles:

  1. Centering a div and an image within it using CSS

[/network/web/html/css] permanent link

Once You Know, You Newegg AliExpress by Alibaba.com

Shop Amazon Local - Subscribe to Deals in Your Neighborhood

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo