Skip to content Skip to sidebar Skip to footer

CSS - Different Approaches Of Styling A Class

Reading the following CSS code I was wondering, what is the difference between a) and b)? Is the first declaration a good way of styling? a) .round_box.icon{ .... } b) .round_b

Solution 1:

With A : You select all the elements with the 2 classes (at the same time)

With B : You select all the elements with class icon inside all the elements with class round_box


Post a Comment for "CSS - Different Approaches Of Styling A Class"