Site logo

Archived topic

CSS for manipulating design on all images including featured image

5 replies · Started by Puneet on December 2, 2021

Viewing posts 1–6 of 6

Hi
1. I need to change how my images look in every single post, including featured images. What is the CSS element I should be using? If I use ".entry-content img {}" then it excludes featured images. Same for youtube embeds if possible. I can figure out the shadows and border radius on my own.

2. I am trying to changed the title color of posts in WP Show posts(in sidebar) with CSS and it doesnt changes from the default blue color. If I use ".wp-show-posts-entry-title a {}"then the color changes but leaves a huge line-height which doesnt change with CSS. Any suggestions for that as well please. If I just use ".wp-show-posts-entry-title {}" I am able to change every aspect but not the color.

A screenshot of my single post: https://snipboard.io/uIkVC7.jpg

Thanks,

Puneet

Hi there,

For #1:

If it's just for the main content area (excluding sidebar images), try this:

main#main .inside-article img,
.entry-content img {
    border-radius: 20px !important;
}

If it's for the entire content area including sidebar, try this:

#page img {
    border-radius: 20px !important;
}

The properties are just examples, you can add in your box-shadow and other stylings if you prefer.

For #2: Can you share the exact CSS properties you've tried?

This selector should work specifically for the sidebar only -

div#right-sidebar .wp-show-posts-entry-title a {
    color: red;
}
/*for WPSP sidebar title hover color */
div#right-sidebar .wp-show-posts-entry-title:hover a {
    color: pink;
}

and this shouldn't adjust the line-height as we didn't specify it. :D

The first one worked but the one for wp-show-posts in sidebar still adds an awkward line height which doesn't change even after adding a line-height CSS. But I guess I can live with blue color for now and probably will approach it later. Thanks for prompt support. Really appreciate it. BTW, the youtube tutorials on generateblocks/ generatepress Premium etc. are very helpful and I hope you keep adding them.

Regards,
Puneet

I'm not sure I'm seeing the line-height change. Does clearing autoptimize cache and browser cache change how it looks on your end?

Note: It may be the element change from the default h2 to span on WPSP settings. Can you try changing that back to the default?

This archived topic is closed to new replies.