[pmwiki-users] Applying styling to links

Petko Yotov 5ko at 5ko.fr
Mon Apr 26 19:35:14 CDT 2010

On Sunday 25 April 2010 21:52:45, DaveG wrote :
> However, if we have this markup, with two links, each having a different
> class specification:
>    %apply=a abc%[[Test/Test | Test]]%% %apply=a def%[[Test/Test | Test]]%%
> The second class ('def') is applied to both links.
> Is there a way to ensure each link gets the correct class?

You can place a line break between the two. If this is a huge problem, I'd use 
the default <span> elements to wrap the links, and style them accordingly :

/* CSS, applies to links inside spans with abc class */
span.abc a { color: red; } 

/* JQuery, do something to links inside spans with abc class */
$("span.abc a").text('PmWiki').appendTo('#footer-lastmod');


More information about the pmwiki-users mailing list