Text-Indent for a text box in IE

2019-07-04 05:27发布

问题:

I'm trying to push my text out of the textbox by giving it an extreme text-indent, but apparently text-indent is ignored/interpreted differently in IE.

Here is a simulation (try it in Chrome and IE to see the difference):
http://jsfiddle.net/Cernx/1/

Is there any workaround for this? Or is there anotherway of pushing text out of the textbox?

回答1:

#paaa { text-indent:50px; display: block; line-height: 1; }

Add line-height to make it work in IE. JSFiddle