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.

Link to comment
Share on other sites

.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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.