Textbox appearance CSS

any reason the following code in my css file wont work on all the textboxes where there is a reference to the css file on that page?
TextBox { 

    font-family: Arial; 
    background-color: Blue;
    color: Blue;
    cursor:progress;
    
}

Open in new window

LVL 1
DB_FuryAsked:
Who is Participating?
 
JF0Connect With a Mentor Commented:
There are three way to implement CSS on a web page and they carry a hierarchical priority.

External Style Sheets can change the look of an entire page. This type of usage is often applied to multiple pages that require the same styles.

<head>
 <link rel="stylesheet" type="text/css" href="mystyle.css" />
 </head>

Internal Style Sheets can change the look of the page which they are applied to. This is useful when a single page needs its own unique style.

<head>
 <style type="text/css">
 hr {color:sienna;}
 p {margin-left:20px;}
 body {background-image:url("images/back40.gif");}
 </style>
 </head>

Inline Style Sheets should rarely be used. They are used on individual tags and only affect that tag. They override any Internal or External style sheet.

<p style="color:sienna;margin-left:20px">This is a  paragraph.</p>

So the heirarchical order goes like this, with 4 being the highest priority:
1. Browser default
2. External style sheet (often this contains a CSS reset to override the Browser Default)
3. Internal style sheet (in the head section)
4. Inline style (inside an HTML element)

0
 
Paul MacDonaldDirector, Information SystemsCommented:
If there's CSS on the page itself or the control itself that overrides the behavior in the CSS file.
0
 
LZ1Commented:
Your css naming convention isn't right.  Try this:
Change TextBox to
input.text
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
govindarajan78Commented:
assign a class for the text box and use the class name in the css

or do as @LZ1 says
0
 
Innocent_EyesCommented:
input[type=text] {
   font-family: Arial;
    background-color: Blue;
    color: Blue;
    cursor:progress;
}
0
 
LZ1Commented:
Any updates?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.