AV1611 Posted December 21, 2007 Share Posted December 21, 2007 Why does this center an image in firefox but not in IE6? In IE6 is is of the left instead? Is it because it's in a <td>? </head> <body style="margin-top: 0px; background-color: #ffffff; background-image: url(topgrad.jpg); background-repeat: repeat-x; "><table align="center" width="90%" cellpadding="0" cellspacing="0" border="0"><tr><td> <div style="margin-left: auto; margin-right: auto; width: 478px;"><img src="topbanner.jpg" alt="" /></div> Link to comment https://forums.phpfreaks.com/topic/82682-center-image-with-div/ Share on other sites More sharing options...
phpQuestioner Posted December 22, 2007 Share Posted December 22, 2007 do it like this: <div style="margin-left:auto;margin-right:auto;width:478px;text-align:center" align="center"> <img src="topbanner.jpg" alt="" /> </div> Link to comment https://forums.phpfreaks.com/topic/82682-center-image-with-div/#findComment-420942 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.