when declaring css styles what is the meaning of classA classB two class names with a dot in the middle and no space

0 votes

I know when there is a space in between, it will look for the class on the right within the class on the left.

.classA .classB {
    ...
}

However, what does it look for when there is no space?

.classA.classB {
    ...
}
Jun 28 in CSS by Edureka
• 10,120 points
31 views

1 answer to this question.

0 votes

The first example (space-separated classes) is a parent-child relationship. .classB is found inside .classA.

<div class="classA">
    <div class="classB"></div>
</div>

The second is for one element with multiple classes, like so:

<div class="classA classB"></div>

Very different situations, but both extremely useful!

answered Jun 28 by Edureka
• 9,540 points

Related Questions In CSS

0 votes
0 answers

What is the difference between id and class in CSS, and when should I use them?

#main { background: #000; ...READ MORE

6 hours ago in CSS by Edureka
• 10,120 points
2 views
0 votes
1 answer

What is the meaning of "cascading' in CSS??

Cascading simply implies that it may be ...READ MORE

answered Aug 3 in CSS by Tanishqa
• 700 points
14 views
0 votes
1 answer

What is the difference between CSS and SCSS?

CSS: Cascading Style Sheets (CSS) is a ...READ MORE

answered Jun 17 in CSS by Edureka
• 9,540 points
18 views
0 votes
1 answer

I want to create a small square colour filled box in HTML & CSS. And most important - I want to write one line after the box

Try using the square html entity: <div style="color:blue">&a ...READ MORE

answered Jun 28 in CSS by Edureka
• 9,540 points
45 views
0 votes
2 answers

Define a SQL query? What is the difference between SELECT and UPDATE Query? How do you use SQL in SAS?

HI.. SQL is Structured Query Language, which is ...READ MORE

answered Aug 8, 2020 in PHP by anonymous
4,756 views
0 votes
1 answer

Using/Handling colon inside a JSF generated HTML element ID in CSS selector

Yes, you can.  Just Backslash (\) the colon.  Like ...READ MORE

answered Nov 14, 2018 in Others by DataKing99
• 8,240 points
1,704 views
0 votes
1 answer

What is a css selector and where is it used?

CSS Selector is a combination of element ...READ MORE

answered Nov 21, 2018 in Data Analytics by Kalgi
• 52,350 points
281 views
0 votes
1 answer

What is the proper way to display a logo with CSS?

An <img> element is the proper way ...READ MORE

answered Jun 10 in CSS by Edureka
• 9,540 points
31 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP