Center HTML content horizontally using CSS


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



Copy this code and paste it in your HTML
  1. #content {
  2. margin: 0 auto;
  3. width: 740px;
  4. }
  5.  
  6. <div id="content">
  7. This is centered
  8. </div>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.