Reputation: 7888
I want to set background image to right and top of my span because my language is right to left. it's fine in firefox but in IE, is not.
Result in IE:
Result in FF:
here is my HTML code:
<span class="info"><?php echo $GLOBALS['artcount'] . $ArticleCount;?></span> <br />
<span class="info"><?php echo $GLOBALS['artview'] . $ArticleViews;?></span> <br />
<span class="info"><?php echo $GLOBALS['failedlog'] . $FailedLogin;?></span> <br />
<span class="info"><?php echo $GLOBALS['slogin'] . $SLogin;?></span> <br />
<span class="info"><?php echo $GLOBALS['bqncnt'] . $bannedIP;?></span> <br />
And css:
.info{
direction:rtl;
text-align:right;
background: url("/images/info.png") no-repeat;/* right top ;*/
background-position: right top;
/*display:block;*/
margin-right: 5px;
padding-right:20px;
}
I know if I uncomment display:block;
it will be ok, but I don't want to. Sometimes I need inline span not block.
Upvotes: 1
Views: 617
Reputation: 164796
Repeating my comment above, try display: inline-block
.
Not sure why IE appears to be repeating the background image. Further testing shows this is apparently not a problem - http://jsfiddle.net/BfDQg/
Upvotes: 3