• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Adding a border to an aligned image?

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Adding a border to an aligned image?

This topic is: not resolved

Tagged: aligned image, Blocks, CSS border

  • This topic has 2 replies, 2 voices, and was last updated 2 years, 9 months ago by andytc.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • October 30, 2019 at 12:54 pm #494328
    RavenManiac
    Participant

    I'm trying to add a border to several aligned images using the following CSS, which I'm placing in the Additional CSS Class under the Advanced section of Blocks. In addition, the caption area is getting messed up with I apply the CSS to aligned images.

    If you scroll down the linked page, you'll see that it works fine with non-aligned images.

    What am I doing wrong?

    /* IMAGE BORDER 
    --------------------------------------------- */
    .photo-border {
        margin-bottom: 12px;
        margin: 20px 0px 10px 0px;
        box-shadow: 0 0 12px #666;
        padding: 10px;
        background-color: #fff;
        line-height: 0;
    }

    Thanks!

    https://williamsburgmemorialpark.com/blog/
    October 30, 2019 at 1:51 pm #494329
    RavenManiac
    Participant

    I think I figured this out, but I had to use an HTML block to do it. Basically I had to add the CSS here:
    <figure class="alignleft is-resized photo-border">

    instead of here:
    <div class="wp-block-image">

    Of course, doing this means I can no longer edit the image visually, which kinda sucks. If anyone has a better, visual, solution please clue me in. 🙂

    October 31, 2019 at 4:37 am #494344
    andytc
    Participant

    have you tried -

    .wp-block-image img {
        margin-bottom: 12px;
        margin: 20px 0px 10px 0px;
        box-shadow: 0 0 12px #666;
        padding: 10px;
        background-color: #fff;
        line-height: 0;
    }
  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2022 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble