So I have div within the container class. How do I center the div, so that it properly adds empty space equally to both sides, depending on the width of the div?
<body>
<div class="container">
... other stuff ...
<div>center me</div>
</div>
</body>
Old question, I know but you could set the
margin-left
andmargin-right
of thatdiv
toauto
. I believe that would do it.