Welcome, Guest! Registration

loc2log

Friday, 2024-04-19
Main » 2012 » May » 22

Wanted a clean CSS solution for centering DIV HTML content, something to replace

DIV align="center"

Found somewhere a solution, which looked easy enough:

.center {margin-left:auto;margin-right:auto;}

Good write-ups: http://css-discuss.incutio.com/wiki/Centering_Block_Element, http://www.w3schools.com/css/css_align.asp

... on vertical alignment - Understanding vertical-align, or "How (Not) To Vertically Center Content"

Views: 1218 | Added by: loc2log | Date: 2012-05-22 | Comments (1)