adsense

Thursday, May 25, 2017

Multiple ID and class seletor



CSS
#divTitle.Format {  }

#divTitle.Format { }

Above CSS rules looks identical but they serves different purposes. As a summary above rules can be described as follows.

First CSS rule will Select all elements with the class named Format that are descendants of the element with an ID of divTitle.

 Second CSS rule will Select the element which has an ID of divTitle and also a class name of Format.

So if you want to select a specific HTML element with a given id and class the second CSS rule will come handy.

More detailed discussion of the above topic can be found here.
 
Cheers
Samitha

No comments:

Post a Comment