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 11 months, 3 weeks ago.

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

    Kim
    Participant
    Post count: 97

    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 11 months, 4 weeks ago by  Kim.
    • This topic was modified 11 months, 4 weeks ago by  Kim.
    • This topic was modified 11 months, 4 weeks ago by  Kim.
    • This topic was modified 11 months, 4 weeks ago by  Kim.
    • This topic was modified 11 months, 4 weeks ago by  Kim.
    • This topic was modified 11 months, 4 weeks ago by  Kim.
    • This topic was modified 11 months, 4 weeks ago by  Kim.
    • This topic was modified 11 months, 4 weeks ago by  Kim.
    http://www.strengthforwomen.org
    #61186

    braddalton
    Participant
    Post count: 9399

    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?


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #61212

    braddalton
    Participant
    Post count: 9399

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


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #61272

    Kim
    Participant
    Post count: 97

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

    #61303

    braddalton
    Participant
    Post count: 9399

    Brad.


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #61395

    Kim
    Participant
    Post count: 97

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

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

You must be logged in to reply to this topic.