MyBB Community Forums

Full Version: CSS
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm making a theme. I want to change the link style for the links under the div#menutop, and that div only. When I add CSS like:

#menutop a:link {
color: #fff;
}

This works, but then, only random links in that section work. Say there are four links- three of the four will change to what I put in the 'color: #fff;' but one random one will stay the same. This differs by browser; in IE9, two of the four links stay the same. My question: What is the right way to change the link style for the links in a single section.

And yes, I love bold.

Thanks for the help!
#menutop a {
color: #fff;
}

Or if you want to control things separately:

#menutop a:link {
color: #fff;
}

#menutop a:visited {
color: #fff;
}

#menutop a:hover {
color: #fff;
}

I think the pseudo-classes names speak for themselves. Read CSS Pseudo-classes for more information.
I'll read into it, thanks Big Grin
Basically the links that randomly stay the same are the links that you have visited. And therefore must be styled using the a:visited pseudo-class.