For example I have this:
<div> <a href="#">sample 1</a> <a href="#">sample 2</a> <a href="#">sample 3</a> </div>
I want to target the first link with CSS.
You can use the first-child selector:
div > a:first-child { /* your css */ }
How to write :hover and :visited condition for a:before? I'm trying a:before:hover but it's not working
What is the difference between the :focus and :active pseudo-classes?
How can I select a certain element in a list of elements? I have the following: <div class="myclass">my text1</div> <!-- some other code follows --> <div> <p>…