Title: Styling PHP-generated Content?
Last modified: August 20, 2016

---

# Styling PHP-generated Content?

 *  [gnruble](https://wordpress.org/support/users/gnruble/)
 * (@gnruble)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/styling-php-generated-content/)
 * I have three blocks of text (Categories/links to posts) at the bottom of my page
   and I’d like to style each one to better represent their corresponding categories.
 * However, they’re all generated from a PHP file, so they’re all under a single
   CSS class – and even when I try to add some style to that, nothing happens.
 * Would there be any way for me to style each one separately using just CSS or 
   without getting into any hardcore PHP coding?
 * Here’s the PHP code:
    [Maggie Tiny Categories](http://pastebin.com/Pc6KTreW)
 * Here’s the link to my site (it’s the bottom-most category list; Android, Microsoft,
   Apple):
    [TechPounce.com](http://techpounce.com)

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

 *  [s_ha_dum](https://wordpress.org/support/users/apljdi/)
 * (@apljdi)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/styling-php-generated-content/#post-2912755)
 * You have the ‘alpha’ and ‘omega’ classes on the first and last item respectively.
   Since you only have three links that should do for you.
 *  Thread Starter [gnruble](https://wordpress.org/support/users/gnruble/)
 * (@gnruble)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/styling-php-generated-content/#post-2912797)
 * Thanks, but what would the class be for the CSS? I’ve tried every combination
   of everything I could think of, with and without !important and I still can’t
   get anything to change.
 *  [s_ha_dum](https://wordpress.org/support/users/apljdi/)
 * (@apljdi)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/styling-php-generated-content/#post-2912799)
 * alpha and omega _are_ the CSS classes. If you don’t see the changes you expect
   increase specificity until you do. `.alpha` to `.home_widget .alpha` to `#primary.
   home_widget .alpha` or the other direction `.alpha a`
 *  Thread Starter [gnruble](https://wordpress.org/support/users/gnruble/)
 * (@gnruble)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/styling-php-generated-content/#post-2912802)
 * Sorry to keep bothering you – I’m finally getting somewhere, but now whenever
   I change the properties of any of the three classes, it just chooses one and 
   styles all three blocks that way.
 * Here’s what I have:
 *     ```
       .alpha .tiny-list {
       background : url('http://techpounce.com/wp-content/uploads/2012/07/Android-BG.png') !important;
       }
   
       .omega .tiny-list {
       background : url('http://techpounce.com/wp-content/uploads/2012/07/Appl-BG.png') !important;
       }
   
       .block_11 .tiny-list {
       background : url('http://techpounce.com/wp-content/uploads/2012/07/Win-BG.png') !important;
       }
       ```
   
 * Why would it be doing that?
 * Thanks
 *  [s_ha_dum](https://wordpress.org/support/users/apljdi/)
 * (@apljdi)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/styling-php-generated-content/#post-2912803)
 * Your last line is over-riding the other two.
 *     ```
       .block_11.alpha .tiny-list {
       background : url('http://techpounce.com/wp-content/uploads/2012/07/Android-BG.png') !important;
       }
   
       .block_11.omega .tiny-list {
       background : url('http://techpounce.com/wp-content/uploads/2012/07/Appl-BG.png') !important;
       }
   
       .block_11 .tiny-list {
       background : url('http://techpounce.com/wp-content/uploads/2012/07/Win-BG.png') !important;
       }
       ```
   
 *  Thread Starter [gnruble](https://wordpress.org/support/users/gnruble/)
 * (@gnruble)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/styling-php-generated-content/#post-2912804)
 * Thanks! 😀

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

The topic ‘Styling PHP-generated Content?’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 2 participants
 * Last reply from: [gnruble](https://wordpress.org/support/users/gnruble/)
 * Last activity: [13 years, 9 months ago](https://wordpress.org/support/topic/styling-php-generated-content/#post-2912804)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
