imahdio / CSS-Essential-Training

3 stars 2 forks source link

multiple class #26

Closed imahdio closed 1 year ago

imahdio commented 1 year ago

I'm studying the "Class and ID selectors" video lesson based on this summary we can use multiple classes like this image in this codesnippet, I try to add blue color to multiple classes .t1 & .t2 while not have any success!

questions:

  1. why .t1.t2 not working on above codesnippet?
  2. what's the meaning of "apply a style only when all of the classes are included" in this lesson?
imahdio commented 1 year ago

based opinion of my study friend "Mohammad hanzale khan"

  1. if add comma between .t1 and .t2 that specific style will be applied to every element include t1 or t2 .
  2. but if merge them into .t1.t2 that style only be applied to the element included both of them simulatancoucly the code snippet have been updated image