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
   
27    
2018
Months
May


Sun, May 27, 2018 9:13 pm

Centering divs with flex-container

With HTML 4, centering the contents within a div is simple. You just use <div align="center">. E.g., if I wanted to center the image and text below on a webpage, I could use the following code:

<div align="center">
<img src="186px-Antinous_Mandragone_profil.jpg" alt="Antinous Mangragone 
profile"><br>
<a href="https://commons.wikimedia.org/wiki/File:Antinous_Mandragone_profil.jpg">
Antinous Mandragone</a>
</div>

The image would then be displayed in browsers as seen below:

Antinous Mangragone profile
Antinous Mandragone

[ More Info ]

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

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo