Post Image "Additional CSS Class" Help Needed

  • Author
    Posts
  • #70362

    Hello,

    How do I apply a custom class to an image? Specifically, if I create a CSS class and try applying it to an image, it has no effect. For a test I created something simple:

    .shopimage {
    border-style: solid;
    border-color: black;
    border- width: 5px;
    }

    And then I added “shopimage” into the “Additional CSS Class” field for that image. The effect was a black border around a container that spans the entire width of the post instead of a border around the image.

    What I’m really trying to accomplish is to have a custom image overlay on specific images in my blog. For example, I have two kinds of linked images – some pop up in a lightbox and some go to a product page in my store. I want to overlay some kind of “Buy this image” button on just the ones that go to the store. As it is now there is no way for a reader to know if you’re going to get a lightbox when you click on an image or if it’s going to take you away to the store. Since they’re both links I can’t just edit the general link CSS.

    Thank you.

    #70432
    Zed
    Cryout Creations mastermind

    Can you post an url for the site/page?


    If you like our creations, help us share by rating them on WordPress.org.
    Please check the available documentation and search the forums before starting a topic.
    #70451

    https://www.dvtwist.com/2018/11/11/2016-florida-adventure/

    Scroll down until you see it – the butterfly photo under the huge bird.

    This brings up another thing – I put caption text under the images until this is resolved, and the captions are, as you can see, scrunched into a thin column.

    Thanks.

    Website: www.dvtwist.com/2018/11/11/2016-florida-adventure

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Post Image "Additional CSS Class" Help Needed’ is closed to new replies.