Previous Message
Next Message

Default style for buttons

Sent by Jukka K. Korpela on 27 August 2004 14:02


On Fri, 27 Aug 2004, Ryan McGreal wrote:

> I'd like to create a default style for form buttons (e.g. <input
> type="submit" />). However, I don't want that style to apply to other
> input elements (e.g. input type="text" />).

In principle, you can use the selector
input[type="submit"]
as defined in CSS 2 and supported by some browsers.

But it's not practical, in general, since IE does not support such
selectors.

> Is there some way (preferably pure CSS, but I'd be happy to hear any
> JavaScript suggestions as well) to have style apply only to buttons
> without having to add a class (e.g. <input type="button"
> class="buttonstyle" />) all the time?

Using classes is the practical way. Boring, but working.

-- 
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/

______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread: