Elfy
Elfy

Reputation: 1863

How do you select any child element?

div > a{

}

applies properties to <a> child. But how can I select any type of element, not just <a> ?

Upvotes: 2

Views: 215

Answers (3)

Atle
Atle

Reputation: 1877

This should select all direct child objects of all DIVs.

div > * {
}

Upvotes: 3

John
John

Reputation: 13720

Use the following...

div > * {}

Upvotes: 1

Nitesh
Nitesh

Reputation: 15739

Use the below.

div > * {
  Your css attributes should be here
}

Hope this helps.

Upvotes: 2

Related Questions