How To Add Shadow To Post/Page Images Only

Community Forums Forums Design Tips and Tricks How To Add Shadow To Post/Page Images Only

This topic is: not resolved

This topic contains 5 replies, has 2 voices, and was last updated by  Kim 1 year, 4 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #61162

    Kim
    Participant

    Hi. I got this code from Brian Dalton’s site and added it to my style.css. It made a wonderful shadow, but I don’t want the images in my sidebar to have shadows.

    img {
    -webkit-box-shadow: 7px 7px 5px rgba(50, 50, 50, 50);
    -moz-box-shadow: 7px 7px 5px rgba(50, 50, 50, 50);
    box-shadow: 7px 7px 5px rgba(50, 50, 50, 50);
    }

    I tried adding the .post- to the code since that is in my .css but it removed all the shadows from all images:

    .post-img {
    -webkit-box-shadow: 7px 7px 5px rgba(50, 50, 50, 50);
    -moz-box-shadow: 7px 7px 5px rgba(50, 50, 50, 50);
    box-shadow: 7px 7px 5px rgba(50, 50, 50, 50);
    }

    Example of the shadow I don’t want in the sidebar
    Example of a page where I do want shadows

    Thanks!

    • This topic was modified 1 year, 4 months ago by  Kim.
    • This topic was modified 1 year, 4 months ago by  Kim.
    • This topic was modified 1 year, 4 months ago by  Kim.
    • This topic was modified 1 year, 4 months ago by  Kim.
    • This topic was modified 1 year, 4 months ago by  Kim.
    • This topic was modified 1 year, 4 months ago by  Kim.
    • This topic was modified 1 year, 4 months ago by  Kim.
    • This topic was modified 1 year, 4 months ago by  Kim.
    http://www.strengthforwomen.org
    #61186

    braddalton
    Participant

    Hi Kim

    Brad Dalton here.

    So you only want it to effect images within the content area of posts, pages and archives and not in sidebars or widget areas?


    #61212

    braddalton
    Participant

    I updated that post with 3 more examples which answer your question.


    #61272

    Kim
    Participant

    Awesome, Brian, thank you! Just what I needed. =)

    #61303

    braddalton
    Participant

    Brad.


    #61395

    Kim
    Participant

    I’m so sorry! Brad!!!!!! =(

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

You must be logged in to reply to this topic.