0 votes
by (160 points)

I've been using Snowman due to it being quite advanced and such, it fits with my story. I am however having a tough time changing the color of my passage links. I have this snippet in the CSS file:

a {
	color: #18FF62;
	text-shadow: 0px 0px 2px rgba(10, 255, 10, .8);
}

That gives my passage links a green color, but if I wanted to change that for one passage only, how would I do it?

I've tried to use:

<span class='blueColor'>[[Link Here]]</span> 

as well as:

<% colorLinks("#1862ff");

function colorLinks(hex)
{
    var links = document.getElementsByTagName("a");
    for(var i=0;i<links.length;i++)
    {
        if(links[i].href)
        {
            links[i].style.color = hex;  
        }
    }  
} %>

But none seem to work. Any suggestions? 

1 Answer

+1 vote
by (153k points)
selected by
 
Best answer

The following CSS would change the link text of your span based example to blue.

.blueColor a {
	color: blue;
}

 

by (160 points)
Thank you, that worked wonders!
Welcome to Twine Q&A, where you can ask questions and receive answers from other members of the community.

You can also find hints and information on Twine on the official wiki and the old forums archive.

See a spam question? Flag it instead of downvoting. A question flagged enough times will automatically be hidden while moderators review it.
...