Css: element.class.class - what does it mean?

Here is the code snippet:

div.note.note_expanded

What does it mean? I understand div.className, but what is the second point?

+3
source share
3 answers

A div that has a class note and note_expanded at the same time

Something like this <div class='note note_expanded'>will fit.

+8
source

This will be aimed at divthat which has both a class .noteand a class .note_expanded.

<div class="note note_expanded">I'm special!</div>

+2
source
<style>
div.note.note_expanded {
  color:blue;
}
div.note {
  color:red;
}
div.note_expanded {
  color:black;
}
</style>
<div class='note note_expanded'> 
This is blue but I would think there must be an easier way.
</div>
+1
source

All Articles