undone
undone

Reputation: 7888

background image position in IE

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 IE

Result in FF:
enter image description here 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

Answers (1)

Phil
Phil

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

Related Questions