Supporting browsers like Mozilla Firefox 14, IE8, Safari 5.1.1, and Chrome 19 on an HTML page can be quite a challenge. In order to maintain proper alignment of elements on the page, I have had to resort to using CSS hacks.
Here is the CSS code:
For Mozilla Firefox and IE8:
.dis_stats
{
position:absolute;
margin-top:-30px;
margin-left:-190px;
background:#E0E0E0;
width:141px;
height:80px;
_position:relative;
_margin-top:-460px;
_margin-left:115px;
}
For Safari & Chrome:
@media screen and (-webkit-min-device-pixel-ratio:0) {
.dis_stats
{
position:absolute;
background:#E0E0E0;
margin-top:-30px;
margin-left:731px;
width:141;
height:80;
}
}
Currently, the styles are working perfectly in Mozilla but encountering issues in IE8 where it is applying properties meant for Safari & Chrome. Removing any Safari & Chrome properties causes IE8 to revert back to its own properties (intended for IE8 & Mozilla).
I am unsure why this discrepancy is happening. Any suggestions on what could be going wrong?