How do I center a <div>? [duplicate]
问题 This question already has answers here : Closed 8 years ago . Possible Duplicate: How to center DIV in DIV? I want to center a <div> (I'm new to HTML5 and the <center> tag is no more), and by all means avoid using a table. This is what I've got as CSS for the <div> in question so far: #roundedcorner { -moz-border-radius: 15px; border-radius: 15px; background-image: url(file:///Macintosh%20HD/Users/julesmazur/Desktop/TAN3.0/Photos/bodydivbg.png); width: 960px; left: 50%; font-family: Ubuntu; }