Title: Div style loop
Last modified: August 20, 2016

---

# Div style loop

 *  [MrCrow](https://wordpress.org/support/users/mrcrow/)
 * (@mrcrow)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/div-style-loop/)
 * I have an image I need to change inside a div according to each page. I have 
   the following code but no images are showing up:
 *     ```
       <div class="quicklink" title="read more..." style=
       			<?php
       			if(is_page('About')) { echo 'class="aboutquicklinksclass"'; }
       			elseif(is_page('News')) { echo 'class="newsquicklinksclass"'; }
       			// continue with elseif lines //
       			else { echo 'class="normalquicklinksclass"'; }
       			?>>
       ```
   
 * And the following CSS code:
 *     ```
       .newsquicklinksclass { background: url (image.jpg) bottom left no-repeat; }
       	.aboutquicklinksclass { background: url (image.jpg) bottom left no-repeat; }
       	.normalquicklinksclass  { background: url (image.jpg) bottom left no-repeat; }
       ```
   
 * Any ideas what’s going on? Thanks.

The topic ‘Div style loop’ is closed to new replies.

 * 0 replies
 * 1 participant
 * Last reply from: [MrCrow](https://wordpress.org/support/users/mrcrow/)
 * Last activity: [14 years, 4 months ago](https://wordpress.org/support/topic/div-style-loop/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
