Silas
Silas

Reputation: 582

Remove Black LEFT and TOP on <INPUT>

I am trying to make an <input> text field with the color code #7d5993, but I see that the top and left are black and the bottom and right are my color. Is there any way to make the entire border my color like how the <textarea> would look?

Here's my code.

Upvotes: 2

Views: 144

Answers (4)

Roopak Venkatakrishnan
Roopak Venkatakrishnan

Reputation: 563

you have to use

border-style:solid

check out my solution here http://jsfiddle.net/fvN8T/

Upvotes: 1

sandeep
sandeep

Reputation: 92793

You have to define border-style:solid also like this:

input{border:2px solid red;}

Check this http://jsfiddle.net/7kE7R/15/

Upvotes: 3

btantlinger
btantlinger

Reputation: 813

Try this

    input{border: 1px solid #7d5993; border-width:2px;}
    input:focus{border: 1px  solid #5190dd; border-width:2px;outline:none;}

    textarea{border: 1px solid #7d5993;border-width:2px;}
    textarea:focus{border: 1px solid #5190dd; border-width:2px; outline:none;}

Upvotes: 2

Linh Nguyen
Linh Nguyen

Reputation: 659

You must add property border-style override default border style of the textarea and input

border-style:solid;

You can check this fiddle

Upvotes: 4

Related Questions