Peel Buccia
Peel Buccia

Reputation: 17

CSS two class on my div

i have this div:

<div class="page-template-default logged-in"></div>

I need to apply a class like this:

.page-template-default .logged-in {
}

But this don't work, why?

Upvotes: 0

Views: 19

Answers (2)

Raul Garcia
Raul Garcia

Reputation: 73

You have to include a comma:

.page-template-default, .logged-in {
}

Upvotes: 0

Manu Masson
Manu Masson

Reputation: 1747

You need to have the selector without a space in between.

.page-template-default.logged-in {

 }

That's a chained class selector.

Upvotes: 1

Related Questions