Jump to content

[SOLVED] Link styling for divs within a div?


FridayRain

Recommended Posts

I'm having some trouble with this. Is it even possible? Googling doesn't come up with anything useful.

 

I have a container div for displaying blog entries, and the entries themselves are displaying in another container div. Both divs use the container div's link styles. However, after all the entries are displayed, but still within the container div, I want to display the page links for navigating the other pages of entries, but no matter what I do, the links remain the color of the container div's style. All I've really done is change font size and the color of non-linked text.

.container a:link {
}
.container a:visited {
}
.container a:hover {
}
.container a:active {
}

Try using this. If this kind of styling doesn't work, then it's a specificity issue-something in your CSS code is more specific about what it is styling, and it overrides this. Try showing us the CSS next time.

 

Of course, it could also be a code typo, where you misspelled the class name in the div or the CSS. That's happened to me more times then I care to count.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.