I'm working on a CSS dropdown menu based on son of suckerfish. I would like to know if there is a CSS selector to select elements directly before a given element. To give an example:
I want to select all links that are before <ul> tags.HTML Code:<li><a href="#">1.1</a></li> <li> <a href="#">1</a> <ul> <li><a href="#">1.1</a></li> </ul> </li>
I know that I can use "li a+ul {}" to select all ul tags in list items that immediately followatags, but How can I selectatags beforeultags?
Without javascript.



Reply With Quote
Bookmarks