If u can, its always a good idea to specify the with property also. Fixed width, overflowhidden and negative text indent will hide the text of any button. This fixes my clients site and mine! Being on a macbook air all day, its easy to ignore ies hiccups.
Those browsers would display the button text, only in the presence of the value attribute. Helped me out hey, just wanted to say that the other fixes seem to not be needed for ie7. When specifying something as 0 you dont need to add px or em or anything to it.
I like your design too! The only thing you need to negatively indent text in an input typebutton is to put text-transformcapitalize one pet peeve though. Great post! Why bother with ie6? Its market share is not (just barely) less than 20. I have been struggling with this one for quite some time, and it is great to find a simple and logical answer to it.
Worked really well! Ive been told that input typeimage causes no issues to developers anyway so might as well just use that but for the case when you cant this is useful! Also had an issue with ie67 not honoring border none on inputs. In any event, its really sad that we have to trick ie so much to do such simple things! I was using a submit button with a background image. Is there a way to center the whole thing? Since it has a displayblock, it always renders a carriage return after the button.
Thank you so much, i thought you only needed line-height0 for ie, but you showed me that overflowhidden displayblock and font0 are needed as well and now it works. Fantastic this is the only solution ive seen that works in ie8 as well as 7 thanks for the fix. You saved me so much time, i redesign my website and ie makes a lot of problems thank you for the solution it works well.
Ive worked on many projects where in i had to style the forminput buttons using custom background images. Have to also declare border-color transparent for ie67 and everything works perfectly. If it has to be typebutton, i think using font-size0 will be better as it wont have to rely on line-height and color. Whether to bother about ie6 or not actually depends on your target audience. I did need the other three styles however (text-indent, font-size, and line-height).
In any event, its really sad that we have to trick ie so much to do such simple things! I was using a submit button with a background image. And also, i would use width0px padding-left114pxoverflowhidden works like a charm thanks for your comment. I had to switch my button to input typesubmit because internet exploader 7 would not let me submit with multiple buttons at the same time. First of all, it is a standard to add the value attribute for buttons. Extra markup i like your idea way better this works but its not accessible.
A great fix for a crummy browser! Many thanks for this. When specifying something as 0 you dont need to add px or em or anything to it. Just played with it and i think the code below is also working fine(ff and ie6) using input type image to replace submit isnt ideal, since some browsers(eg ie) may not even submit the form. Thank you so much, i thought you only needed line-height0 for ie, but you showed me that overflowhidden displayblock and font0 are needed as well and now it works. But even after adding this line, you would notice a black line(which is basically the text) on the center of the button in ie6.
. Nice little fix, i found that display inline-block worked nice to keep buttons in a row. Just as you would do for a normal link. A blog to keep you updated on the latest design trends. Ha thanks mate! Ive come across this a few times just never googled the correct stuff to get a decent answer. Have to also declare border-color transparent for ie67 and everything works perfectly. Even though this is just a tiny problem, it had delayed the launch of a website. How would you manage to draw two of these buttons in the same row without using tables? I tried this and worked well, but after a bit more trying i found a simpler way thanks gopal for this fix and that you ichr for the excellent update. Hes the founder of someone to do it for you? Plz answer back as im looking to create my own blog and would like to know where u got this from. You saved me so much time, i redesign my website and ie makes a lot of problems thank you for the solution it works well.How Do I Fix It? Troubleshooting 500 Errors Learn How To Customize This Page. For full information on 500 errors and how to resolve them, please contact us, or learn more with the support links above.