• Resolved susannahmoss

    (@susannahmoss)


    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/
    The theme is catch responsive pro.

Viewing 2 replies - 1 through 2 (of 2 total)
  • 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

    Thread Starter susannahmoss

    (@susannahmoss)

    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.