How to center things using CSS

Center text Structure your HTML like this <div class="container"> <p>Hello, (centered) World!</p> </div> And then use following CSS p { text-align: center; } Center a Div with CSS Margin Auto <div class="container"> <div class="child"></div> </div> .child { margin: 0 auto; } Center a Div Horizontally with Flexbox <div class="container"> <div class="child"></div> </div> .container { display: flex; justify-content: center; }

September 5, 2019 · 1 min · Saqib Razzaq

Markdown Syntax Guide

This article offers a sample of basic Markdown syntax that can be used in Hugo content files, also it shows whether basic HTML elements are decorated with CSS in a Hugo theme. ...

March 11, 2019 · 3 min · Hugo Authors