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.
Loading

Jignesh TrivediPosted Apr 10, 2014, 12:51 AM
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.
Sanjay SinghPosted Apr 26, 2014, 11:09 AM
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"
Munesh SharmaPosted Apr 9, 2014, 7:50 AM
for example.
type="text" name="inputxt" class="class1 class2">
yellow colour will print