You can use an 'attribute selector' to match all elements with a particular attribute key/value. What you are looking for is something like this;


input[type="submit"] {
        ...
}

You can find more information here;

http://www.w3.org/TR/REC-CSS2/selector.html#attribute-selectors

J
---
Jeremy Sisson
http://www.jeremysisson.com
416.433.4046


On Dec 9, 2003, at 6:56 PM, Taco Fleur wrote:


Is there some way that you can only target input elements with type SUBMIT?

Example;

<style>
form input
{
�������background-color: #FFCFCE;
������� border: 1px solid black;
�������font-weight: bold;
������� color: white;
������� width: 160px;
�������background-image: url(../image/buttonSubmit_background03.gif);
������� cursor: hand;
�������background-repeat: repeat-x;
}
</style>
</head>

<body>

<form>
� <input type="submit" value="test"><br/>
� <input type="text" name="blah">
</form>

This would apply the style over all INPUT elements, but I was wondering if it could be just applied to the input elements that have type SUBMIT or BUTTON?

I realize I could do it the following way, but thats not what I am after.

<style>
form input .submit
{
�������background-color: #FFCFCE;
������� border: 1px solid black;
�������font-weight: bold;
������� color: white;
������� width: 160px;
�������background-image: url(../image/buttonSubmit_background03.gif);
������� cursor: hand;
�������background-repeat: repeat-x;
}
</style>
</head>

<body>

<form>
� <input type="submit" value="test" class="submit"><br/>
� <input type="text" name="blah">
</form>
Taco Fleur
Tell me and I will forget
Show me and I will remember
Teach me and I will learn

***************************************************** The discussion list for http://webstandardsgroup.org/ *****************************************************



Reply via email to