问题
I have a link containing a span which should read something like "link +", this displays correctly in all browsers except ie7:
<a style="display: inline; width:200px;" href="">
Open a ticket
<span style="float: right">+</span>
</a>
Visit http://jsfiddle.net/nGJ5b/ in ie7 to see what I mean. Has anybody knowledge of a fix for this?
回答1:
You can try and display every element as a block:
<a style="display: block; width:200px;" href="">
<span style="float: left; display: block;">Open a ticket</span>
<span style="float: right; display: block;">+</span>
</a>
Of course, this will not be acceptable if you need that link to be inline.
回答2:
Placing the span before any other element seemed to do the trick. http://jsfiddle.net/nGJ5b/1/
来源:https://stackoverflow.com/questions/6355959/ie7-line-height-issue