Why doesn't this work?

0 votes
asked Jan 7 by vanillacoke (430 points)

HTML in game:

blahblah, <span class="bluelink"><<linkappend "something">></span>

blah blah

<</linkappend>>


CSS:

.bluelink a {
  color: blue;
}

.bluelink a:hover {
  color: indigo;
}

"</span>" becomes part of the text after the player clicks on the linkappend. But removing it causes an error. Why is this so? Is it not possible to colour linkappends a different colour than normal links?

1 Answer

+1 vote
answered Jan 7 by greyelf (90,650 points)
selected Jan 7 by vanillacoke
 
Best answer

You can't interlace start and end tags.

BAD: <tag1> <tag2> </tag1> </tag2>

GOOD: <tag1> <tag2> </tag2> </tag1>

 

Try the following:

blahblah, <span class="bluelink"><<linkappend "something">>

blah blah

<</linkappend>></span>

 

commented Jan 7 by vanillacoke (430 points)
I see, thanks!
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.
...