How to change link color?

Alex_J
11 Oct 2017, 14:05

Hi guys, I'm wondering If it is possible to give passage link and section link defferent color?

e.g: this is a passage link and this is a section link

Currently both passage and section link has same color.


Padrinos
13 Oct 2017, 05:23

I'm pretty sure you can change with CSS, but since squiffy doesn't recognize it you have to do it after you publish it. There will be a fike called style.css Open that and you can alter the looks of links, borders, ect.


Alex_J
13 Oct 2017, 07:48

I know, It is possible to change link color by editing this.

a.squiffy-link
{
text-decoration: underline;
color: blue;
cursor: pointer;
}

Inside the style.css file but the problem is, it will change color of both section link and passage link to blue.

But I want section link to have red color and passage link to have blue color. ( maybe that is possible by modifying javascript in story.js?)


K.V.
13 Oct 2017, 08:06

style.css

//a.squiffy-link
//{
//    text-decoration: underline;
//    color: Blue;
//    cursor: pointer;
//}
a.squiffy-link.link-section
{
    text-decoration: underline;
    color: Green;
    cursor: pointer;
}
a.squiffy-link.link-passage
{
    text-decoration: underline;
    color: Red;
    cursor: pointer;
}

image


image


Alex_J
13 Oct 2017, 08:13

Thanks K.V, You're amazing :D


K.V.
13 Oct 2017, 08:36

You're welcome! (I just recently learned this stuff. I was the opposite of amazing when it came to CSS about 4 months ago.)


Here's a bonus prize:

a.squiffy-link.link-section:hover
{
    text-decoration: underline;
    color: Blue;
    cursor: pointer;
}
a.squiffy-link.link-passage:hover
{
    text-decoration: underline;
    color: Purple;
    cursor: pointer;
}

Alex_J
13 Oct 2017, 08:56

I already knew about the hover effect :). That will surely help those who have no idea about hover effect ;)


K.V.
13 Oct 2017, 09:11

I thought that was probably the case, considering how close you were already, but it was the only extra bonus I could come up with. (Ha-ha-ha!)


Padrinos
13 Oct 2017, 15:19

Thanks K.V. I am learning lots here from everyone


Alex_J
13 Oct 2017, 16:16

Now we can switch section link into stylish buttons if we want ofc.


K.V.
13 Oct 2017, 17:51

Thanks K.V.

No problem!

I am learning lots here from everyone

Me too! Every single day!

Isn't it great?