In IE versions 6 and earlier, if you have several buttons with the same name but with three different values and text displayed inside the button to the user (see code sample below), it does not matter which button is pressed, data from all three are passed through, rather than just the button that is pressed (IE7, IE8 only submit the data from the button pressed).
IE7+ submits data just from just the pressed submit button which is the way it should be.
In that link they are talking only about IE up to IE8.
They are also talking about the situation where there could be problems if you have multiple submit <button>'s in a form and you want to send the value to see which button was clicked. If you have only 1 submit button per form then it is not an issue.
As I said, I use <button> quite a bit and I don’t have any problems with it.
Like a lot of aspects of building a web site, there will be limitations with all sorts of things and as long as you know how things work and the workarounds then you shouldn’t have any major problems.
But to answer your question, use whichever type of button you are most comfortable with. All the buttons will do what you want.
Certainly not the last way for starters that’s inaccessible the second is just a image and the first is a submit button function perhaps you are really after BUTTON?
It’s probably the focus; if you want to make is extremely HARD and inaccessible for people who use keyboards to navigate your page then remove it… Otherwise think very carefully and leave it be (yes you can remove it) but like I said, it might be unwise to do so for obvious reasons.
Technically if the text does go over two lines then yes BUTTON is used. Really BUTTON was created for containing richer content not just wrapping text or using an IMG whereas INPUT cannot contain content as it’s EMPTY. However, in 1999, CSS support in some mainstream browsers was let’s say very ‘iffy’.
Irrelevant background decoration and nothing to do with the control; if you need a image to convey meaning or other content then you’d use BUTTON that is all I was explaining. I know what you were getting at; if you just want to style a button (and the image content doesn’t matter one iota) then use CSS, its horses for courses. I’ve already mentioned the benefits or more correctly the appropriate usage or contextual differences.
So I was able to implement your code and suggestions and things look really nice!!
However, one small problem…
I have pages with buttons on them that are not currently associated with a form.
For example, after a person leaves a comment, I post a confirmation message and then give them the ability to “Return to Article” or “Go to Home Page” as seen in Post #27 above.
Is there a way to implement you awesome solution with these non-form-based, standalone buttons?? :-/
(Since you created the sprite from my original buttons, there really isn’t any way to tell whether a button uses your sprite-approach or is an image button - except for the hover-over behavior. So, I suppose I could keep using my image buttons in cases like this, however, if I can implement your solution site-wide, that would be the best!)