View Full Version : Match span style to anchor style w/o js

11-02-2011, 05:23 PM
Hey All,
Wondering if there is a simple way to style a class of span to match the styles established for anchor tags (whatever they might be) to effect a pseudo anchor.
Ok, I fear that doesn't make a lot of sense... so I'll try to clarify.
Instead of using
<a href='#' onclick='blablabla'>link text</a>
<a href='javascript:void(0)' onclick='blablabla'>link text</a>
I would like to use
<span class='pseudo_link'>link text</span>
where the only properties defined for the pseudo_link class would be something like

{ colors:link;
} without hard coding the hover, active visited colors etc.
I can maybe see doing it via jQuery retrieving the anchor tag css params on Load and applying them to pseudo_link classed elements, but there must be a better way?

11-02-2011, 06:31 PM
Why don't you not have the "href" portion? Like:

<a>link text</a>

Would that work?

11-02-2011, 06:49 PM
Thanks resdog!
That's just the thing, though I did have to add

a.pseudo_link { cursor:pointer; }
to my stylesheet.
So simple... I feel silly now having asked:eek: