Different link colors in one div class
-
I am trying to make the category link on my home page post meta a different color than the comment link. Both links located in one div class.
I’d like the comment link to retain the default link color while the category link takes on the color of the dynamic class I’ve assigned to that category.
Here is my php:
<div class="homepostmeta1">Posted in <span class="homepostcat1"><?php the_category(', ') ?></span> <?php echo time_ago(); ?> : <?php comments_popup_link('Leave a Comment', '1 Comment', '% Comments'); ?></div>And here is my css:
.homepostmeta1 { font-size: 11px; color: #222; text-decoration: none; } .homepostmeta1 a, a:visited, a:active { color: #419f9f; text-decoration: none; } .homepostmeta1 a:hover { text-decoration: none; } .homepostcat1 a:link, a:visited, a:active { color: #9f4141; text-decoration: none; } .homepostcat1 a:hover { text-decoration: underline; }Can anyone help?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘Different link colors in one div class’ is closed to new replies.