CSS: Refer to link item by it's target url/href

user3181315

I'm looking for a way to refer to a link by it's target URL. I can't change the HTML to give the links unique names or such. So basically something like:

a whereTargetURL="/Destination"
{
styling
}
Nicolas Henrard

You can proceed like that: http://jsfiddle.net/4F83h/

HTML <a href="demo.html">My link</a>

CSS

a[href="demo.html"]{
    /*your rules*/
}

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

css :target selector one link targeting two div's?

Mark link's target

HTML: local web css refer to internet link?

CSS selector with link without target attribute

What is the correct CSS nesting sequence to target the item I need to target

Change target link based on visitor's country

Locally link url()s in CSS

How to change content of a div after link click using CSS :target?

how to make target link work giving different css properities

Using a pseudo-element (::before) as jump link target not working in CSS

How to determine if a soft link's target is a directory or a file?

the router-link config's target do not generate to html code

Any accessability importance to link fragment's target IDs?

iOS - Link a framework with higher deployment target than my project's

Refer to List item

Refer to the property of a target in generator expression of custom target

Identify with CSS or JQUERY whether content of list item begins with a link

In Hartl's Rails Tutorial, what does the CSS for textarea refer to?

CSS: Using :target to change css on multiple ID's

How to use cmake's target_link_libraries to link libraries matching a glob?

Having a dirent that is a symbolic link, how can I get the link-target's path name?

Is it possible to create a soft link on my desktop which opens with the target path instead of the link's path?

Usage of <link> tag to refer to an external CSS file not working, what I did wrong?

What's default HTML/CSS link color?

CSS - :target ~

Append to target link libraries

Remove soft link but not the target

Optimization Target must be a link

Changing a target link with javascript