Auto Center Margin Reject HTML Content
I have the following HTML
<div id="team"> <h1>Team</h1> <img src="assets/divider.png" id="divider"> <img src="assets/team.png" id="team_pic"> </div> Next CSS
div#team { margin: 0 auto; margin-left:auto; margin-right:auto; right:auto; left:auto; } However, the child divider and the pic command are all the way to the left. I though margin: the car will center everything.
then I put the following in child elements.
div#team img#team_pic { width:704px; height:462px; margin-left:auto; margin-left:auto; } No, nothing happens, the elements remain on the left and are not centered.
+4
6 answers