• Resolved rickibird

    (@rickibird)


    When I float an image left or right the surrounding text wraps nicely. However, when I put a caption in it the image is poorly aligned – gets a narrow margin at the top, the caption text spills out beyond the image and, most annoyingly, the surrounding text wont wrap.

    I’ve tried every css trick that I know on the style.css file but all to no avail.

    Would appreciate some help with this.

    Page is here

Viewing 2 replies - 1 through 2 (of 2 total)
  • with caption you should float the caption wrapper div.wp-caption not the image inside it. Try add the below code inside your theme’s style.css

    .wp-caption.alignleft, img.alignleft{
     float:left;
     margin: 0pt 5px 1px 0pt
    }
    
    .wp-caption.alignright, img.alignright{
     float:right;
     margin: 0pt 0pt 1px 5px
    }
    
    .wp-caption.aligncenter, img.aligncenter{
     margin: 0pt auto
    }

    and also checkout out default (kubrick) style.css

    Thread Starter rickibird

    (@rickibird)

    Thanks chaoskaizer – you’re a winner!

    That solved the alignment issue. There are some other minor issues with the captions themselves but I’ll work through them.

    You’re help is much appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Text clears left or right aligned images when captioned’ is closed to new replies.