11 Mar

CSS Tip: Styling Input Buttons for Safari

March 11th, 2007 — 11:03 pm Dave

Styling input buttons (e.g. <input type="button" name="blah">) for Safari is a pain as I learned this evening. Actually it’s impossible. So instead of using the input tag try using the button tag (e.g. <button name="blah">). Works the same from what I can tell and can actually be styled across at least FF and Safari. Just make sure your CSS is referencing the appropriate tag.

#1: MakTheYak said on Mar 28 at 9:33 am

I’m having similar difficulties although I have been put off using the <button> tag recently when I discovered IE6 (and possibly 7) treats it differently when submitting forms – Safari / Firefox will submit the value of the ‘value’ attribute whereas IE will submit the value of the text between the <button> tags. Very frustrating as it provided a good way of styling buttons in Safari…

#2: Dave said on Mar 28 at 10:54 am

Ah, thanks for the note. We hadn’t gone that far with using buttons. We were just using them for a toolbar and not actually submitting any data. I really like Safari as a browser but the inability to style inputs it’s a huge pain as a developer.

Add comment

You are adding a new comment