Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between the selectors ".class.class" and ".class .class"?

What is the different between .class.class and .class .class?

like image 883
Muhammad Umer Avatar asked Jun 30 '13 14:06

Muhammad Umer


People also ask

What does .class .class mean in CSS?

Definition and Usageclass selector selects elements with a specific class attribute. To select elements with a specific class, write a period (.) character, followed by the name of the class. You can also specify that only specific HTML elements should be affected by a class.

What are the 3 different kinds of selectors in CSS?

Simple selectors (select elements based on name, id, class) Combinator selectors (select elements based on a specific relationship between them) Pseudo-class selectors (select elements based on a certain state)

What is a selector class?

The class selector is a way to select all of the elements with the specified class name, and apply styles to each of the matching elements. The selector must start with a period ( . ) and then the class name.

What is the difference between class selectors and ID selectors?

Difference between id and class attribute: The only difference between them is that “id” is unique in a page and can only apply to at most one element, while “class” selector can apply to multiple elements.


1 Answers

.class .class matches any elements of class .class that are descendants of another element with the class .class.

.class.class matches any element with both classes.

like image 200
esqew Avatar answered Oct 18 '22 11:10

esqew