Center a div inside of a div

/ Published in: CSS
Save to your folder(s)

Of course, you don't have to set the width to 50%. Any width less than the containing div will work. The margin: auto is what does the actual centering.


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.