tags:

views:

60

answers:

2

I want to set color of some elements to default link color with CSS.

<a href="/">That color</a> is the same as <span style="color: link;">that</span>.

Any way to do that? This website don't change default browser's link color.

+1  A: 

Even if you don't change the default color, it would still be a good idea to specify the color to ensure that it looks the same in all browsers. I'd put something like this in the stylesheet:

a, span.link {
  color: blue;
}

a:visited, span.visited {
   color: purple;
}

a:active, span.active {
   color: red;
}

Then you can style spans as links by <span class="link">Your fake link</span>

PatrikAkerstrand
+1  A: 

after some time messing around with testing pure css and css/javascript i'm sure you can't set the color of any other element to the default link-color of the browser - but like Machine said, you can try using classes to do this (but you won't be able to use the browser defaults, you have to set your own colors)

oezi