0

I'm using asp.net website and I need to apply css style to all text boxes and html Input with type text in one place. I hope to help me in this issue ..

2 Answers 2

6

You can do this with CSS:

[type=text] {
    color:Red;
    border: 1px solid black;   
}

This will apply that style to any element that is an input of type text. This will also work with the ASP text box control because that renders out as an input with a type of text.

Sign up to request clarification or add additional context in comments.

Comments

1

The above CSS will show:

Error "Unexpected Character Sequence.Expected a selecter for style Rule."

You have to write the following code:

input[type=”text”] { 
    color:Red; 
    border: 1px solid black;   
}

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.