Single Image Height Adjust on Mobile

Posted in: Newspaper
Post count: 45

Hello –

I’m using a Single Image element and have set my image height to 250px so it’s nice and big on desktop + iPad viewports BUT when I view on an iPhone, the image width shrinks nicely within the row but the element is still taking up 250px height – so there is a big bunch of blank space between the image and then the next content element.

Is there some CSS that I can use to target the smaller mobile viewport and reduce the height of the Single Image element to 125px on those screens?

Thx!
Dale

Post count: 35449

Hi,

If I understand correctly when you say “Single Image” you refer to logo, if is so there is a way to set different Logo for mobile; go in Newspaper > Theme panel > Header > Logo for mobile and set your mobile logo https://www.screencast.com/t/U1glxznAp
If is not that please put here your url site, so i can inspect the problem.

Thank you.

Post count: 45

Hi – sorry, I should have clarified – I’m referencing the Single Image element that I dragged into the TagDiv Composer.

You can see it here:

When you view on mobile, it retains the 250px height and creates a big blank
space below.

Thx!

Post count: 35449

hi,

That will happen on low resolution, to resolve your problem you need to add a custom CSS
go in Newspaper > Theme panel > Custom cod >custom css and paste this code there :


@media
(max-width: 600px){
.td_block_single_image .tdm-mobile-full{
height: 125px!Important;
}
}

You can change the height and max-width on your desire.
I hope this will help you.

Thank you.

Post count: 45

Works perfectly – thank you!

Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic.