Hi,
I have a CSS classes named
class1
{
color:red;
}
class2
{
color:blue;
}
class3
{
color:yellow;
}
and I have a text box
The text box includes 3 classes. So on running the text box which will be the color of the text and how can I predict the color.
Is it possible to use 2 or more classes in html text box or
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Jignesh TrivediRank #16 · 50.3K reputationPosted Apr 9, 2014, 8:51 PM EDT
hi,
Generally if you css classes contain duplicate properties and html apply lastly define property.
In you case all css classes has common property "color" and last you are applying class3 so class3 will apply on text box.
hope this will help you.
Munesh SharmaRank #174 · 13.9K reputationPosted Apr 9, 2014, 3:50 AM EDT
for example.
type="text" name="inputxt" class="class1 class2">
yellow colour will print
Sanjay SinghRank #779 · 2.9K reputationPosted Apr 26, 2014, 7:09 AM EDT
when you use more than one class in a same text then the only the last class
will run.
in your code the text color is "YELOW"