How to style input fields with CSS?

There are situations where you need to style input fields depending on there types.

Doing this is wrong:

    border:solid 1px red;
bad input css

As you see in the image, the CSS rule has been applied to all input fields (a text input field, and an image input)

You can specify the type of input field that you are targeting by doing like this:

    border:solid 1px red;
good input css

Leave a comment

Your email address will not be published.