• Resolved Jaakko P?ntinen

    (@jpontinen)


    Hi there, I’m relatively new to CSS, HTML and WordPress.

    I’ve added img {box-shadow: 3px 3px 9px #4C4843;} to my theme to have light shadows behind posted images. The problem is that this effects ALL imagery in my blog: site logo, images in sidebar widgets etc.

    How do I go about affecting only the images that have been posted in blog entries with CSS?

    I’m running the latest version of wp.org and the theme I’m modifying is a child version of the latest Generatepress.

    Thank you in advance,
    – Jaakko P?ntinen

    EDIT: I use a plugin called “Simple CSS” to inject CSS modifications via the wp.org theme customizer.

Viewing 2 replies - 1 through 2 (of 2 total)
  • CSS to affect images inside blog posts ONLY

    try:

    .hentry img { ...... }

    Thread Starter Jaakko P?ntinen

    (@jpontinen)

    Thanks, Michael! That sure did it.

    A related discovery: .wp-caption .wp-caption-text { ... } is for altering the captions and just .wp.caption { ... } seems to be for the image container.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘CSS to affect images inside blog posts ONLY?’ is closed to new replies.