Web Design Forum HTML CSS JavaScript PHP Graphic Design SEO forum
How can I center a HTML div using px? - Printable Version

+- Web Design Forum HTML CSS JavaScript PHP Graphic Design SEO forum (http://www.webdesignforum.com.au)
+-- Forum: Web and Graphic Design (/forumdisplay.php?fid=1)
+--- Forum: Graphic Design (/forumdisplay.php?fid=5)
+--- Thread: How can I center a HTML div using px? (/showthread.php?tid=31820)



How can I center a HTML div using px? - Orlova - 10-25-2016 06:36 PM

How can I center a HTML div using px? Please suggest me some tips.


RE: How can I center a HTML div using px? - arogyamaller - 01-11-2020 09:41 PM

<body>
<div style="width:800px; margin:0 auto;">
centered content
</div>
</body>


RE: How can I center a HTML div using px? - bright - 03-04-2020 10:45 PM

Thanks to share with us


RE: How can I center a HTML div using px? - RuskinF - 06-25-2020 02:17 AM

Enclose it into a parent element and then “text-align: center”