Trevon rawls Trevon rawls - 5 months ago 15
CSS Question

Centering issue with HTML & CSS

currently my issue is this: http://prntscr.com/bhafke
Browser: Chrome

For some reason, it's not centering properly. Below you'll find my code:

HTML:

<body>
<div id="wrapper">
<h1>Test Text</h1>
</div> <!-- wrapper div end -->
</body>


CSS:

#wrapper {
width: 100%;
max-width: 960px;
margin: 0 auto;
}

Answer

Use text-align: center; to center the heading text within the div.