sibling selector
The Fine Art of Web Development by Martin Ivanov
Imagine you have the following markup… [sourcecode language=”html”] <ul> <li>item 0</li> <li>item 1</li> <li class="marked">item 2</li> <li class="marked">item 3</li> <li class="marked">item 4</li> </ul> [/sourcecode] … And you need to apply special styles only to the first occurence of the .selected class. CSS3 has a lot of possibilities for selecting elements, … Continue reading “Selecting only the first element occurrence out of siblings with the same class name with CSS3”
Categories and Tags
Links
© 2006 - 2023 Martin Ivanov