Title: CSS classes somehow interlinked
Last modified: August 20, 2016

---

# CSS classes somehow interlinked

 *  Resolved [Jacob Martella](https://wordpress.org/support/users/arenapigskin/)
 * (@arenapigskin)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/css-classes-somehow-interlinked/)
 * I’m having a major issue trying to create a theme. I have two class that have
   somehow managed to interlink with each other. On is “p.widget-body” and the other
   is “h3.category-headline”. The code for both is below.
 *     ```
       p.widget-body{
       	color: #FFF;
       	font-size: 12px;
       }
       p.widget-body a:link, a:visited, a:hover{
       	color: #FFF;
       	font-size: 12px;
       }
       ```
   
 *     ```
       h3.category-headline a, a:link, a:visited, a:hover{
       	color: #000033;
       	font-size: 20px;
       }
       ```
   
 * It’s becoming really frustrating considering this is the only thing wrong now
   with the theme. Everything else works like a dream.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Rev. Voodoo](https://wordpress.org/support/users/rvoodoo/)
 * (@rvoodoo)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/css-classes-somehow-interlinked/#post-2806307)
 * I think you aren’t being specific enough…
 * On the 2 selectors you specifiy
 *     ```
       a:link, a:visited, a:hover
       ```
   
 * which is the exact same thing – you are setting the link/visited/hover properties
   for ALL links sitewide with that code
 * I think what you mean is
 *     ```
       h3.category-headline a,
       h3.category-headline a:link,
       h3.category-headline a:visited,
       h3.category-headline a:hover {
       ```
   
 * and of course, you would do the same for the p.widget-body block
 *  Thread Starter [Jacob Martella](https://wordpress.org/support/users/arenapigskin/)
 * (@arenapigskin)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/css-classes-somehow-interlinked/#post-2806328)
 * Thanks. It worked. Should have known better. Nothing like a simple solution to
   a seemingly complicated problem to make you come down to earth. Such is the life
   of a newby web developer.
 *  [Rev. Voodoo](https://wordpress.org/support/users/rvoodoo/)
 * (@rvoodoo)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/css-classes-somehow-interlinked/#post-2806453)
 * >  Such is the life of a newby web developer
 * HA! Don’t I know it!!
 * I’m glad that worked for you!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘CSS classes somehow interlinked’ is closed to new replies.

## Tags

 * [css](https://wordpress.org/support/topic-tag/css/)
 * [override css](https://wordpress.org/support/topic-tag/override-css/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [Rev. Voodoo](https://wordpress.org/support/users/rvoodoo/)
 * Last activity: [13 years, 11 months ago](https://wordpress.org/support/topic/css-classes-somehow-interlinked/#post-2806453)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
