CSS: a:active not working?
4 posters
Page 1 of 1
CSS: a:active not working?
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
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, 11:47 pm; edited 1 time in total
Re: CSS: a:active not working?
What are you trying to do?
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: CSS: a:active not working?
Hi @Hert,
Have you setup your anchor rules like so ?
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 :
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;
}
Re: CSS: a:active not working?
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:
(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.
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;
}
(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.
Re: CSS: a:active not working?
Yep that's all good.
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 :
and something like that to override it through a sheet.
Although I'm not entirely sure if that was the cause in your case.
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.
Re: CSS: a:active not working?
Try adding the CSS codes to the top of the stylesheet.
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: CSS: a:active not working?
@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 (;
@SLGray: Thank you, but I've already kind off fixed it (;
Re: CSS: a:active not working?
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
APE
Re: CSS: a:active not working?
Topic solved and archived
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Similar topics
» Todays Active Topics tab not working
» user is active - no
» Active topics of the day
» How to Add Active Class to navbar
» Why is this forum still active?
» user is active - no
» Active topics of the day
» How to Add Active Class to navbar
» Why is this forum still active?
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum