Can you style "type"?

For some strange reason, my submit button is showing up as a different font than my labels and inputs.

Is there a way to apply a style to type=“submit”?

I know I could add a class, but it would be a pain to have to do that for every form button you ever used!

1 Like

You can apply different styles to various input types:

input[type=submit] {}
input[type=number] {}
Etc...

2 Likes

Cool.

Just to be safe wrap the attribute value with double or single quotes like
input[type='submit'] or input[type="submit"]

Declaring a value or identifier in an attribute selector without any quotes is fine in simple cases like that, but in general, I’d avoid not using quotes.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.