The forum of the forums

Would you like to react to this message? Create an account in a few clicks or log in to continue.
The forum of the forums
4 posters

    CSS: a:active not working?

    Hert
    Hert
    Forumember


    Posts : 81
    Reputation : 3
    Language : Dutch and English

    Solved CSS: a:active not working?

    Post by Hert July 13th 2015, 6:26 pm

    Hello,

    I've been trying several things to make it work, but for some reason the a:active code does not work?
    I have no default settings for it, neither for normal links but they do seem to work.
    I've also tried: .gen a:active - but sadly that also doesn't seem to work.
    I'm mainly focussing on the inbox right now, I haven't made any changes to the template.

    Hopefully someone can help me with this problem!

    Greetings,
    Hert


    Last edited by Hert on July 14th 2015, 5:47 pm; edited 1 time in total
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51554
    Reputation : 3523
    Language : English
    Location : United States

    Solved Re: CSS: a:active not working?

    Post by SLGray July 13th 2015, 9:49 pm

    What are you trying to do?



    CSS: a:active not working? Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    Solved Re: CSS: a:active not working?

    Post by Ange Tuteur July 14th 2015, 1:21 am

    Hi @Hert,

    Have you setup your anchor rules like so ?
    Code:
    a:link {
      color:#39C;
    }

    a:visited {
      color:#99C
    }

    a:hover {
      color:#17A;
    }

    a:active {
      color:#333;
    }

    Your active rule should always be after :link, :visited, and :hover. Otherwise the :hover rule can override the :active rule. If it's still not taking effect, I'd recommend adding the !important flag to the properties in your :active rule. For example :
    Code:
    a:active {
      color:#333 !important;
    }
    Hert
    Hert
    Forumember


    Posts : 81
    Reputation : 3
    Language : Dutch and English

    Solved Re: CSS: a:active not working?

    Post by Hert July 14th 2015, 5:42 am

    Hello @Ange Tuteur, thank you for wanting to help me with this (:

    I did forget to place the rules in the correct order, but even after I did it still didn't work. I've also tried adding the !important flag - but it's still getting ignored.
    Right now these are my CSS codes:
    Code:
    a:link {
     color: #e57757; font: 10px 'Oswald';
      text-transform: uppercase;  
      text-decoration: none!important;
    }

    a:visited {
      color: #e57757; font: 10px 'Oswald';
      text-decoration: none !important;
    text-transform:uppercase;
    }

    a:hover{
      color: #e57757; font: 10px 'Oswald';
        text-decoration: none !important;
    text-transform:uppercase;
        }

    a:active { 
        font: 10px 'Oswald' !important;
      text-transform: uppercase !important;
      color: #000000 !important;
    }
    Maybe I still did something wrong and I'm not seeing it?
    (I will also skim through the rest of my CSS codes, but it's a looong list, to see if there could be a possible error somewhere else).



    EDIT: I searched around and came to the conclusion that, for some reason, the links inbox, sentbox, outbox, savebox are not registered as active links when you are on one of these certain pages. I do not understand how or why, but I edited it in the HTML and it does work now.
    I think that solves it, eventhough I would like to know WHY it is this way.
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    Solved Re: CSS: a:active not working?

    Post by Ange Tuteur July 14th 2015, 12:28 pm

    Yep that's all good. Wink

    I'm only speculating, but if the anchor has a child element which defines a color, then you'll need to access this child element with CSS to change the color because it will override the parent's rule.

    Something similar to this for example :
    Code:
    <a href="#"><span style="color:red">text</span></a>

    and something like that to override it through a sheet.
    Code:
    a:active > span { color:blue !important }

    Although I'm not entirely sure if that was the cause in your case. blackeye
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51554
    Reputation : 3523
    Language : English
    Location : United States

    Solved Re: CSS: a:active not working?

    Post by SLGray July 14th 2015, 1:50 pm

    Try adding the CSS codes to the top of the stylesheet.



    CSS: a:active not working? Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    Hert
    Hert
    Forumember


    Posts : 81
    Reputation : 3
    Language : Dutch and English

    Solved Re: CSS: a:active not working?

    Post by Hert July 14th 2015, 2:42 pm

    @Ange Tuteur: Well you would think it's that, but that does not explain why the other CSS codes DID work on it - because then they should've been overrided aswell, don't you think?

    @SLGray: Thank you, but I've already kind off fixed it (;
    Ape
    Ape
    Administrator
    Administrator


    Male Posts : 19432
    Reputation : 2010
    Language : fluent in dork / mumbojumbo & English haha

    Solved Re: CSS: a:active not working?

    Post by Ape July 14th 2015, 5:41 pm

    so is your problem now solved ? if yes please click on the solved button at the top of your first post so the staff know to lock it for you.

    APE



    CSS: a:active not working? Left1212CSS: a:active not working? Center11CSS: a:active not working? Right112
    CSS: a:active not working? Ape_b110
    CSS: a:active not working? Ape1010
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51554
    Reputation : 3523
    Language : English
    Location : United States

    Solved Re: CSS: a:active not working?

    Post by SLGray July 14th 2015, 7:52 pm

    Topic solved and archived



    CSS: a:active not working? Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.

      Current date/time is November 11th 2024, 2:47 pm