I’m using the digest theme and have been able to change the width of the home page featured image through Settings > Design. But it doesn’t look like there is a setting to make the same change on post pages. And so I’m looking for a way to inject code into the header to override the styles on a post page. I’ve seen this post in the forum and looked at the class assigned to the div surrounding the image (gh-article-image), and tried it on my site, but it doesn’t seem to be working. Any ideas?
Thanks in advance for any help anyone can offer - it’s much appreciated!
Look at the code for the page (Ctrl u on Firefox) find the name for the image used on that theme. If it’s not
.gh-article-image; it might be .gh-article, or something completely unrelated.
Thanks Lance. The image itself doesn’t have a class, but the div that contains the image has a class of gh-article-image. I had tried a bunch of stuff to change the styling for that div and for the image within it - and nothing worked (including I thought, what ultimately worked, but I guess not). I got it to work with this:
.gh-article-image img {
max-width: 1200px;
width: 1200px;
margin: 0 auto !important;
grid-column: wide-start/wide-end !important;
}
Thanks,
Frank
1 Like