Home > Back-end >  Wordpress featured image as full width-image: achieved with additional CSS
Wordpress featured image as full width-image: achieved with additional CSS

Time:03-14

...running wordpress Version 5.9.2 : i was wondering if there’s an easy way to customize the CSS for the featured image to appear with full width. At the moment the image has a huge margin - and is not full width as it appears on the page (see below) - enter image description here

enter image description here

CodePudding user response:

Your question is a little vague. If you want to make the first wp-block-image on every page 100% width, you can do this. But it will work on every page.

You need to understand better how to scope your css.

But this should work.

article .wp-block-image:first-of-type img {
    width: 100%;
}
  • Related