Centering block elements horizontally


/ Published in: CSS

For all modern browser this line of css is enough to horizontally center a block level element.


Copy this code and paste it in your HTML
  1. margin: 0 auto;

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.