[Support request] Is there a way to get shadow boxes around images in a post?

Home Forums Support [Support request] Is there a way to get shadow boxes around images in a post?

Home Forums Support Is there a way to get shadow boxes around images in a post?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1529099
    Heath

    I have a shadowbox around the widgets using CSS. Is the same possible for images or is that not advisable?

    #1529107
    Elvin
    Staff
    Customer Support

    Hi,

    I have a shadowbox around the widgets using CSS. Is the same possible for images or is that not advisable?

    Its definitely possible. but as for it being advisable? It depends on many things. There are definitely things to consider.

    If your site follows a specific branding guideline, consider consulting with the designer if adding box shadow effect is applicable.

    If you’re just winging things and is going by feel, then its really up to you.

    Personally, I think adding box shadow is fine as long as its subtle. I find it useful when I want to put emphasis on a particular section/element as it can be used to make things stand-out over certain backgrounds or group of contents. 🙂

    #1529262
    Heath

    Yeah its just me and I think it’d look great on some images. Is there CSS to add to make a show box appear around a particular image or is that editing that needs to be done prior to adding the image to my site library?

    #1529574
    David
    Staff
    Customer Support

    Hi there,

    you could add some CSS like so:

    .has-shadow img {
        box-shadow: 0 2px 8px 2px rgba(0,0,0,0.5);
    }

    Then in the Block Editor select the image you want the shadow applied to, go to Settings > Advanced –> Additional CSS class(es) and add: has-shadow

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.