So you have the brilliant idea of using text-indent instead. After all, that's what this property was intended to handle. style="width:100%;text-indent:4px". Perfect. Looks great. Except on IE where for some logic-defying reason, the browser actually indents the entire text field rather than just the text inside the field. WTF?! Who are these people who implement the CSS standards and where do I sign up to beat them with an improvised bolo made from an old 56k modem & phone cord.
Thankfully someone intelligent on the IE team realized that their rendering engine was so broken, that web developers might need to write IE-specific code to handle it without making the display look like a bad interpretation of Picasso's home page. So now I've added the following to my web page:
And that's when I took up heavy drinking to dull the pain...
<!--[if IE]>
<style type="text/css">
INPUT .textfield {
padding-left:4px;
text-indent:0; }
</style>
<![endif]-->
this had absolutely nothing to do with the problem i was trying to resolve but was good for a laugh (it's funny 'cause it's true)!!!!
Posted by: Dave | July 14, 2009 at 11:10 AM
This works fine with input type=text but not with textarea
when using textarea and have a second line.. then the text-indent is not nice at all :(
Posted by: Motaz Abuthiab | October 20, 2009 at 06:25 PM