macroLink - font colour

Discuss macro implementations, ask for macro help (to share your creations, see User Creations, probably either Campaign Frameworks or Drop-in Resources).

Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice

Post Reply
User avatar
Blakey
Dragon
Posts: 778
Joined: Fri Mar 23, 2007 11:27 am
Location: Sussex, UK.

macroLink - font colour

Post by Blakey »

Hello all,

I have a frame which has a macroLink or three on it. All these links are displayed in the default blue colour. This happens to be hard to read on some of the backgrounds I'm displaying the links on. Is there a way to change the colour of the link so-displayed?

Cheers!
Blakey
The guy in the green hat.

User avatar
aliasmask
RPTools Team
Posts: 9029
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: macroLink - font colour

Post by aliasmask »

Code: Select all

<span style='color:red'><a href="http://forums.rptools.net/posting.php?mode=reply&f=20&t=15381">text</a></span>
Just surround it with a span tag and set the style.

User avatar
Blakey
Dragon
Posts: 778
Joined: Fri Mar 23, 2007 11:27 am
Location: Sussex, UK.

Re: macroLink - font colour

Post by Blakey »

Just tried this and it works a treat.

Thanks!
Blakey
The guy in the green hat.

User avatar
biodude
Dragon
Posts: 444
Joined: Sun Jun 15, 2008 2:40 pm
Location: Montréal, QC

Re: macroLink - font colour

Post by biodude »

The 'style' attribute also applies to many other tags, not just <span>, so you can also apply it directly to the <a> tag:

Code: Select all

<a href="http://forums.rptools.net/posting.php?mode=reply&f=20&t=15381" style='color:red'>text</a>
This is not always feasible if you are generating links using Wiki: macroLink(), but does work well with Wiki: macroLinkText(). Just a little something to keep in mind to help simplify your HTML.
"The trouble with communicating is believing you have achieved it"
[ d20 StatBlock Importer ] [ Batch Edit Macros ] [ Canned Speech UI ] [ Lib: Math ]

User avatar
Raoden
Dragon
Posts: 381
Joined: Fri Dec 18, 2009 2:33 am
Location: San Diego

Re: macroLink - font colour

Post by Raoden »

You can also change macroLink colors with CSS. The CSS selector 'a' applies to them.
"Fairy tales do not tell children the dragons exist. Children already know that dragons exist. Fairy tales tell children the dragons can be killed."
- G. K. Chesterton

Wonderful HTML/CSS reference * Color Manager * Token Manager 2.0

Post Reply

Return to “Macros”