Posted by mrpauldriver on April 29, 2011 at 2:27pm
I have two link styles defined in my subtheme.css however the second one is overriding the first so that all links appear the same.
I understand that styles can sometimes behave in such a way if they get duplicated and that the solution is to group elements with a class or ID. What makes me even more confused is that I haven't had this difficulty with other Omega sites that I have been working on.
I have tried both classes and ID's and I have tried disabling all the default CSS provided by the Omega base theme.
Try as I might, I can not get this to work and have very little hair left. Please will somebody put me out of my misery.
My stylesheet looks like this:
/* -------------------- CONTENT LINKS--------------------- /
#content-container a:link, a:visited {
color: #0062A0;
text-decoration: none;
}
#content-container a:hover {
text-decoration: underline;
color: #D20000;
}
#content-container a:active {
color: #D20000;
text-decoration: none;
}
/ -------------------- FOOTER LINKS--------------------- */
#region-footer_second a:link, a:visited {
color: #fff;
text-decoration: none;
}
#region-footer_second a:hover {
text-decoration: underline;
color: #fff;
}
#region-footer_second a:active {
text-decoration: underline;
color: #fff;
}
Comments
Try it this way...
/* -------------------- CONTENT LINKS--------------------- /
#content-container a:link,#content-container a:visited {
color: #0062A0;
text-decoration: none;
}
#content-container a:hover {
text-decoration: underline;
color: #D20000;
}
#content-container a:active {
color: #D20000;
text-decoration: none;
}
/ -------------------- FOOTER LINKS--------------------- */
#region-footer_second a:link,#region-footer_second a:visited {
color: #fff;
text-decoration: none;
}
#region-footer_second a:hover {
text-decoration: underline;
color: #fff;
}
#region-footer_second a:active {
text-decoration: underline;
color: #fff;
}
the second item for a:visited was defaulting to the last one as THAT declaration wasn't specific enough to the appropriate container, but applying to ALL the visited links
Jake Strawn (@himerus)
ThemeGeeks | Development Geeks
Omega - 960.gs
So happy
Thanks Jake. I was really starting to lose the plot.
BTW I see that you are planning to attend DrupalCon London. I've just booked my hotel and will look forward to meeting you.
Paul
@MrPaulDriver
did that fix it?
Did that CSS change make it "work" for what you expected?
And yep, I'll be in London for sure! We'll see you there!
Jake Strawn (@himerus)
ThemeGeeks | Development Geeks
Omega - 960.gs
Yes thanks
Yes it worked just as I wanted. Thanks again
I know Croydon well and can recommend the Croydon Park Hotel. It's literally next door to Fairfield Halls, DrupalCon venue and does a fantastic breakfast.
@MrPaulDriver