john wagner
john wagner

Reputation: 811

Can I style an input button to be just a rectangle with a border?

I would like to style my input buttons to take away all the normal styling and just make them into rectangles with rounded edges. I'm new to CSS. Can someone tell me if it's possible to do this.

John

Upvotes: 1

Views: 7740

Answers (1)

Tatu Ulmanen
Tatu Ulmanen

Reputation: 124788

Yea, sure.

input[type=submit], input[type=button], button {
    border: 1px solid #000;
    background: #f00;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    border-radius: 5px;
}

There you go.

http://jsfiddle.net/4fW4y/

Example with more bells and whistles:

http://jsfiddle.net/4fW4y/1/

And yea, as Jeroen noted, the fancier effects are supported only in modern browsers.

Upvotes: 7

Related Questions