HTML / CSS StyleSheet Question

Superwormy

Golden Member
Feb 7, 2001
1,637
0
0
Ok, I have a stylesheet, I want to make all <input type="text"> follow a set CSS style, BUT I want all <input type="submit"> to follow another.

I know I can do the following:

INPUT {
width: 15px;
}

BUT that makes all my submit buttons and reset buttons the same size as textfield entries. How can I avoid that?
 

RSMemphis

Golden Member
Oct 6, 2001
1,521
0
0
<style>
.inputtext {width: 15px; }
.inputsubmit { width: 25px; }
</style>

<form bla bla bla>
<input type="text" class="inputtext">
<input type="submit" class="inputsubmit">
</form>


I am sure there are other ways, but that's the one I use.
 

Superwormy

Golden Member
Feb 7, 2001
1,637
0
0
But then I have to set class="inputsubmit" on EVERY single submit button, is there a way to just say all submit buttons follow this style...?
 

RSMemphis

Golden Member
Oct 6, 2001
1,521
0
0
Try this (it does not work in all browsers though, so I can't recommend it):

<style>
input[type="submit"] {pos: 15px;}
</style>

I think it's a CSS2 command, so YMMV.