hi everyone! sorry if this is already answered somewhere, but i can't seem to find the solution to this. i wanna display, in the same passage, text with different colors. i know how to use CSS to change the colors of the whole passage, but not invidividual sentences. it seems so simple, but i have no idea how to do it! can anyone help me?
Comments
You probably want to use span classes. Take a look at this thread:
http://twinery.org/forum/index.php/topic,1055.msg1727.html#msg1727
EDIT: Or you can be lazy and use HTML: Good luck!
<span style="color:red">red text</span>
Got it from here:
http://stackoverflow.com/questions/4182554/html-css-font-color-vs-span-style
That's really handy. But how do you use it when you are using a custom defined stylesheet? I am using L's Muet stylesheet and I tried using the same method as you described above but the colours are not changing in the block of text. The Twine wiki example for this includes altering the letter spacing and font size which that part did work but just no colour change. I presume the colour change is being overriden by the main Muet stylesheet? The syntax is correct because I did a test with a blank twine game with no custom stylesheet.
If you have a web browser with debugging capabilities (such as the right-click ; Inspect Element option in Firefox) you can check which CSS styles are active on each element of your story's HTML. That is usually much quicker than trying to fix things by trial and error.
I've tried:
a.link {
.passage a:hover
color:#ff00ff !important;
text-decoration: none;
}
but <span> doesn't seem to change the color. When I get rid of the !important built into the stylesheet, no hover colors appear at all.
I really know nothing about CSS, so I've been trying to hash together some piecemeal solutions, to no avail...
This is not valid CSS syntax. If you want to apply the same block to multiple selectors, it should look like this: