[pmwiki-users] How to selectively remove underlining from links

Randy Brown randy at brownragfilms.com
Sat Mar 15 20:58:13 CDT 2014


I expected both of these wikistyled links to work, but neither did. The first one looked like a normal link. The second one was red normally, and didn't change when hovering over it.

I've tried many variations of the php code and the markup without success.  Below is my most recent attempt. What am I doing wrong? 

My latest markup:

[[{$FullName}|%apply=link blue text-decoration:none% link should be blue without an underline]] 

%apply=link text-decoration:none% %apply=hover red text-decoration:underline%  [[{$FullName}|should be normally without an underline, but be red with an underline when hovering]]

My latest php code in config:

$WikiStyleApply['link'] = 'a';
$WikiStyleApply['hover'] = 'a:hover';

Randy


On Mar 15, 2014, at 1:26 AM, Randy Brown <randy at brownragfilms.com> wrote:

> Thank you! This is what finally worked:
> 
> In configuration files I have:
> 
> # Allow CSS styling of links, e.g. to remove underline
> $WikiStyleApply['link'] = 'a';
> 
> SDVA($WikiStyle['buttonlink'], array(
>       'background-color' => '#EEEEEE',
>       'color' => '#333333',
>       'text-decoration' => 'none',
>       'border-top' => '1px solid #CCCCCC',
>       'border-right' => '1px solid #333333',
>       'border-bottom' => '1px solid #333333',
>       'border-left' => '1px solid #CCCCCC',
>       'padding' => '2px 6px 2px 6px',
>       'font' => 'bold 11px Arial' 
> ));
> 
> In my markup I have:
> 
> %apply=link text-decoration:none %[[PmWiki.WikiStyles | %buttonlink%test link]]
> 
> Randy



More information about the pmwiki-users mailing list