Featured-IMG-in-Header Issue: IMG Height

Posted in: Newspaper
Post count: 13

Example, this link: http://owlcomics.com/index.php/2017/04/27/circulatory-system-summary/

I need this featured image in the header, but this image is too tall.

Is there a css code to limit the header’s “height” to cut off automatically at 500 pixels ACROSS THE WHOLE WEBSITE, FOR EVERY POST, instead of including the entirety of its featured images?

Thanks in advance-
Randy

Post count: 20688

Hi,

You could use a different post template style, that displays a smaller featured image
https://www.screencast.com/t/dZm7x3Foiwjp
The featured image used in this post template does not have a limit and displays the image based on the full theme width – https://www.screencast.com/t/NSalEio6p
It would not be easy to change the way the featured image size, this would require modifications to all the other elements like the post title, category tag etc. If you were to set a height limit on the image the result will look like this – https://www.screencast.com/t/zgQ2ZyW40 or like this if you set the limit on the div containing the image – https://www.screencast.com/t/drJ0a2kSOZ9
Maybe you could modify the images used before setting them as featured, in a image editor.

Thanks

Post count: 13

Thank you. This you posted: https://www.screencast.com/t/drJ0a2kSOZ9 is EXACTLY what I am looking for.

Is there a CSS code that I can input to UNIVERSALLY Make all the posts CUT off its header at 650 pixels in height?

Post count: 20688

Hi,

You could set a maximum height for the featured image in the post page
https://www.screencast.com/t/NqQiHcBqcOC
https://www.screencast.com/t/hoW3ze8vUS
Setting a max height is better, because if an image would be smaller it will not stretch. The code will apply only on post pages, and must be entered in Theme panel->Custom CSs. You can experiment with different height values if you want.

.single .td-post-featured-image {
max-height: 650px;
}

Thanks

Post count: 13

Thank you, the problem is solved.

Viewing 5 posts - 1 through 5 (of 5 total)
The forum ‘Newspaper’ is closed to new topics and replies.