[resolved] Text clears left or right aligned images when captioned (3 posts)

  1. rickibird
    Posted 7 years ago #

    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

  2. chaoskaizer
    Posted 7 years ago #

    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{
     margin: 0pt 5px 1px 0pt
    .wp-caption.alignright, img.alignright{
     margin: 0pt 0pt 1px 5px
    .wp-caption.aligncenter, img.aligncenter{
     margin: 0pt auto

    and also checkout out default (kubrick) style.css

  3. rickibird
    Posted 7 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.