Title: Using post navigation with CSS classes instead images
Last modified: August 21, 2016

---

# Using post navigation with CSS classes instead images

 *  [karlicus](https://wordpress.org/support/users/karlicus/)
 * (@karlicus)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/using-post-navigation-with-css-classes-instead-images/)
 * In WordPress, I have created a custom post type. For navigation I created a left
   and a right arrow with pure CSS, .arrow_left and .arrow_right.
 * My CSS:
 *     ```
       .arrow_left {
         position:absolute;
         left:10px;
         top:5px;
         width: 0;
         height: 0;
         border-top: 10px solid transparent;
         border-bottom: 10px solid transparent;
         border-right:10px solid lightgrey;
       }
   
       .arrow_right {
         position:absolute;
         right:10px;
         top:5px;
         width: 0;
         height: 0;
         border-top: 10px solid transparent;
         border-bottom: 10px solid transparent;
         border-left:10px solid lightgrey;
       }
       ```
   
 * Now I would like to attach the navigation functionality to these CSS arrows. 
   I tried out the following:
 *     ```
       <?php previous_post_link('%link','<div class="arrow_left"></div>'); ?>
       <?php next_post_link('%link','<div class="arrow_right"></div>'); ?>
       ```
   
 * My problem: When applying this code, both arrows disappear. What’s wrong about
   the code?

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

 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [12 years, 2 months ago](https://wordpress.org/support/topic/using-post-navigation-with-css-classes-instead-images/#post-4752614)
 * Have you tried using something like “Firebug” to explore this?
 *  Thread Starter [karlicus](https://wordpress.org/support/users/karlicus/)
 * (@karlicus)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/using-post-navigation-with-css-classes-instead-images/#post-4752624)
 * I use Chrome. U mean looking it up in the console? No, I havent found anything
 *  Thread Starter [karlicus](https://wordpress.org/support/users/karlicus/)
 * (@karlicus)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/using-post-navigation-with-css-classes-instead-images/#post-4752625)
 * 
 * `<a href="WHICH CODE???"><div class="arrow_left"></div></a>`

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

The topic ‘Using post navigation with CSS classes instead images’ is closed to new
replies.

## Tags

 * [custom post type](https://wordpress.org/support/topic-tag/custom-post-type/)
 * [navigation](https://wordpress.org/support/topic-tag/navigation/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [posts](https://wordpress.org/support/topic-tag/posts/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [karlicus](https://wordpress.org/support/users/karlicus/)
 * Last activity: [12 years, 2 months ago](https://wordpress.org/support/topic/using-post-navigation-with-css-classes-instead-images/#post-4752625)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
