How would you get the following tag using CSS?
<p>You can only use the text inside the tag</p>
As in xpath I'd use the following:
//p[contains(text(), "inside the tag")
PS: I can't close the xpath, it tries to auto complete with code... :S
How would you get the following tag using CSS?
<p>You can only use the text inside the tag</p>
As in xpath I'd use the following:
//p[contains(text(), "inside the tag")
PS: I can't close the xpath, it tries to auto complete with code... :S
I believe CSS3 selectors can only filter attributes, not the text within tags. So you could do something like a[href~="aspx"]
to match links to aspx pages, but that's as far as content-based matching can go.
For what you want to do, you'll probably have to use javascript or server-side processing.
Have a look at quirksmode and W3 for more information.