Karel Bílek
Karel Bílek

Reputation: 37658

What does this CSS pathname means?

I saw this CSS pathname on one project I am working on and since I don't understand CSS much, I don't understand what it actually means. The CSS looks like that:

body input.name_of_class {
    /*some properties here*/
}

What does the body input means?

Upvotes: 0

Views: 124

Answers (3)

Ron van der Heijden
Ron van der Heijden

Reputation: 15070

If you want to know these selectors you also could google for cheat sheet.

What i found about CSS2

What i found about CSS3

Upvotes: 1

Priyank Patel
Priyank Patel

Reputation: 6996

Basically the CSS you see is trying to apply some styles on some input elements who have a class someClass and they are within the body.

So

body input
{
/*some style*/
}

may apply these styles to all input elements on the page.

So to narrow down your selection , you can use

body input.someClass
{
/*some style*/
}

This will apply styles to all input element with class someClass.

Upvotes: 0

Andy
Andy

Reputation: 14575

That means all <input> tags inside the <body> with the class name name_of_class will be affected

Upvotes: 1

Related Questions