This code should work (in my opinion) but, I ca’t figure out why it won’t. Thanks in advance
<body>
<div id="wrap">
<div style="margin:auto;"><img src="logo.png" alt="logo"/></div>
</div>
</body>
</html>
EDIT:
I’m trying to center it. It stays in the upper left hand corner. Adding a height and width of auto to both divs also did not work.
you need to check 2 things before you set your division’s to center.
Doctype : check whether it is not in quirks mode.
Width of inner div must me less that width of parent div.
do check these things you will get your answer…All the best.