WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Creating different settings for left- and right-aligned images (4 posts)

  1. ksegall
    Member
    Posted 4 years ago #

    Without captions, my post images look perfect whether they are left- or right-aligned. With captions, different settings take over. I need to add space around the image (WITH CAPTION) on the left or right, depending on the image alignment. It seems straightforward in the CSS, but I just can't create separate settings for the left- and right-aligned images with captions. I would be eternally grateful for any advice! Thanks. The brief CSS relating to images in my site are in the pastebin:

    http://wordpress.pastebin.ca/1842383

  2. Rev. Voodoo
    Volunteer Moderator
    Posted 4 years ago #

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

    are what I have for captions...can you work with this?

  3. ksegall
    Member
    Posted 4 years ago #

    Damn, you did it! Thank you! It was just one silly space I had in there that was screwing it up. I'll learn one day. Everything's beautiful now. Much appreciated!

  4. Rev. Voodoo
    Volunteer Moderator
    Posted 4 years ago #

    sure thing...glad my generic shot-in-the-dark attempt helped you! ;)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.