Skip to content Skip to sidebar Skip to footer

Default Button Color

Found out that the default button for enter on a form is the first submit type. This works but what do I specify for the button to look like the default button, i.e. the one that

Solution 1:

The statement “If I set the background color this changes the button appearance from the standard button look” pretty much summarizes the limitations. You can style buttons, but many types of styling deprive buttons of the features they have as per system defaults. Browsers use some built-in routines for rendering buttons, but many CSS settings make them deviate from this. It is generally not possible to imitate the common button style, partly because it varies by system, partly because it has rendering features that cannot be described in CSS as currently defined and implemented.

So just let buttons look like buttons. If you cannot do that, style all of your buttons in some uniform way; it would be misleading to make the non-default button look like a common button and the default button look like something else.

There is really no need to indicate one of the buttons as the default button if you just remove the other button. (See Reset / Cancel Button Considered Harmful.)

Solution 2:

By default, buttons are drawn by the operating system, and the browser doesn't control how they look. If you start changing the CSS properties of a button, the browser takes over and draws the button in its own way. If you're looking for an easy way to get nice looking buttons with different colours, try bootstrap. It's a very good CSS stylesheet, especially when it comes to construction great looking forms.

http://twitter.github.com/bootstrap/

Post a Comment for "Default Button Color"