+ 1
How can i separate two same tag in CSS tag?
html=<p class="serif">solo learn</p> <p class="serif">I love my country</p> CSS=P.serif{font-family:"Times New Roman",Times,serif color:red} p.serif{font-family:"Times New Roma ",Times,serif color:blue} When this code is comes to run then output always take 2nd CSS tag. it means two tags color is blue..solo learn is suppose to be red but it show color blue...so, how can i separate this two tags?
4 Antworten
+ 3
You can't seperate two same tag with same class however if they have different tags than you can but not with same tags and same classes for that use different classes or id's
+ 3
Use two different classes, e.g.: .serif1 and .serif2
+ 2
thanks
0
In this tag what will be the different classes or id's?