Internet Explorer and Google Chrome different showup of content
Posted
by
NDLombardi
on Stack Overflow
See other posts from Stack Overflow
or by NDLombardi
Published on 2013-06-29T10:15:26Z
Indexed on
2013/06/29
10:21 UTC
Read the original article
Hit count: 170
I'm setting up an online form where to choose boxes and stuff. I almost finished the whole thing when I said to my self "Let's try it in IE".
This is the result I want and what comes up in Google Chrome:
And this is what happens in IE:
And this is the CSS and HTML for that part:
<!--- HTML --->
<div id="choosen"><img src="img.jpg" class="center-img" /></div>
/* --- CSS --- */
img.center-img{
margin-top:15px;
position:relative;
width: <?php echo $width; ?>px;
left:50%;
margin-left:-<?php echo $width/2; ?>px;
}
Basically the image is centered into the div as this page I'm writing will be included into another one which I never saw and someone else will do it.
© Stack Overflow or respective owner