Ok, I have code like this:
<div id="header"> (yeah, have to use div instead of header tag, don't ask me why)
<a href="link"><img src="image1.png" alt="image1" /></a>
<a href="link"><img src="image2.png" alt="image2" /></a>
<a href="link"><img src="image3.png" alt="image3" /></a>
</div>
And I want to select the first image after div (first link image) and two last links in css.
I know I could do it by nth-child or first/last child selectors. But I want to use "+" and "~". But they doesn't seem to work!
For example:
#header + a {
border: solid 1px red;
}
Gives border to... Nothing!
This one also doesn't seem to work:
#header a + img {
border: solid 1px red;
}
What's wrong?
Same effect with "~". Tested in all major browsers....