[Pmwiki-users] Odd tip for style sheets

Christian Ridderström chr
Tue Jan 20 12:26:33 CST 2004


Here's a snippet of style sheet code I found on the Opera list. It's 
useful to have links that open in a new window (e.g. %target=_blank%) 
rendered with an '@' before it - to visually indicate that this link will 
open in a new window.

/* Label with targeted links
A lime colour is used in the assumption that the background won't be lime.  
(If it is, the site has bigger problems) */

/* Give any link with a target an "register" character to indicate the  
link is targetting a window with a specific name */

a[href][target]:before {
        color:lime;
        font-weight:bolder;
        content: "\AE";
}

/* Give any link with a target of _blank an "at" symbol to indicate it  
will open in a new window
This will override the initial rule for targeted links if appropriate */

a[href][target=_blank]:before {
        color:lime;
        font-weight:bolder;
        content: "\40";
}


/Christian

PS. I personally use this in Opera so that when I look at web pages in 
general, I'll know if the link will open in a new page, or in a 'named' 
page.

-- 
Dr. Christian Ridderstr?m, +46-8-768 39 44       http://www.md.kth.se/~chr




More information about the pmwiki-users mailing list