Title: Image caption and borders
Last modified: August 30, 2016

---

# Image caption and borders

 *  Resolved [susannahmoss](https://wordpress.org/support/users/susannahmoss/)
 * (@susannahmoss)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/image-caption-and-borders/)
 * Hey there,
    I am trying to to make it so that my image captions are on top of
   the image, so i have put in this Custom css: ‘p.wp-caption-text { position:relative;
   top: -60px; text-align: right; padding:10px 10px 10px 10px; }’ Which puts the
   caption just were i want it, But I can’t get ride of the gray border around the
   image, Ive tried everything I can think of, any help would be really appreciated.
   Thanks. Check out this page to see what I meen: [http://www.wildhungry.co.uk/crossing-mount-doom/](http://www.wildhungry.co.uk/crossing-mount-doom/)
   The theme is catch responsive pro.

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

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/image-caption-and-borders/#post-6207755)
 * I could not see the caption, and had to adapt the CSS;
 * try:
 *     ```
       .wp-caption { position: relative; border: none; background: transparent; }
       p.wp-caption-text {
       position: absolute;
       top: 20px;
       text-align: right;
       ...etc...
       ```
   
 * to remove the padding around the image whihc causes the slight reduction in width
   of the captioned image, consider to add filter, as described in the caption shortcode:
 *     ```
       /**
       	 * Filter the width of an image's caption.
       	 *
       	 * By default, the caption is 10 pixels greater than the width of the image,
       	 * to prevent post content from running up against a floated image.
       	 *
       	 * @since 3.7.0
       	 *
       	 * @see img_caption_shortcode()
       	 *
       	 * @param int    $caption_width Width of the caption in pixels. To remove this inline style,
       	 *                              return zero.
       	 * @param array  $atts          Attributes of the caption shortcode.
       	 * @param string $content       The image element, possibly wrapped in a hyperlink.
       	 */
       	$caption_width = apply_filters( 'img_caption_shortcode_width', $caption_width, $atts, $content );
       ```
   
 * please ask the developer of your theme for help to implement that; [http://codex.wordpress.org/Forum_Welcome#Commercial_Products](http://codex.wordpress.org/Forum_Welcome#Commercial_Products)
 *  Thread Starter [susannahmoss](https://wordpress.org/support/users/susannahmoss/)
 * (@susannahmoss)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/image-caption-and-borders/#post-6207987)
 * Hey,
    Sorry. I forgot to thank you, I used that code and it worked great so thanks
   so much. Cheers

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

The topic ‘Image caption and borders’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [susannahmoss](https://wordpress.org/support/users/susannahmoss/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/image-caption-and-borders/#post-6207987)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
