CMS Development

loubogatchek
参加者

Mobile specific masthead

解決

Hi,

We use the background image module for mastheads on our blogs. On desktop it's a landscape picture, but on mobile it crops it to display only the far left side of it.

I wanted to know if there's a way to upload a separate image that will show only on mobile so that users don't just see half a face or an empty background under our blog titles...

Here's what our latest blog looks like for example: https://blog.innerdrive.co.uk/do-parents-treat-their-sons-and-daughters-differently

Thanks for your help!

0 いいね!
1件の承認済みベストアンサー
tjoyce
解決策
名誉エキスパート | Elite Partner
名誉エキスパート | Elite Partner

Mobile specific masthead

解決

@loubogatchek - no problem. This is more of an opinion but, your simplest solution is to remove the title from that section and shrink the header image. Your title appears twice consecutively in the page, so I would remove the first instance of it and leave the image.

The following CSS would do that for you.

@media screen and (max-width:767px){
    .hs-blog-post .custom-banner-wrapper {
        min-height: 150px !important;
        background-position: center center;
    }
    .hs-blog-post .custom-banner-wrapper .custom-section-header {
        display: none;
    }
}

And it will end up looking like this.

op.png


If this answer helped, please, mark as solved 😄


tim@belch.io | forms.belch.io | Design your own Beautiful HubSpot Forms; No coding necessary.

 

Drop by and say Hi to me on slack.

元の投稿で解決策を見る

4件の返信
tjoyce
解決策
名誉エキスパート | Elite Partner
名誉エキスパート | Elite Partner

Mobile specific masthead

解決

@loubogatchek - no problem. This is more of an opinion but, your simplest solution is to remove the title from that section and shrink the header image. Your title appears twice consecutively in the page, so I would remove the first instance of it and leave the image.

The following CSS would do that for you.

@media screen and (max-width:767px){
    .hs-blog-post .custom-banner-wrapper {
        min-height: 150px !important;
        background-position: center center;
    }
    .hs-blog-post .custom-banner-wrapper .custom-section-header {
        display: none;
    }
}

And it will end up looking like this.

op.png


If this answer helped, please, mark as solved 😄


tim@belch.io | forms.belch.io | Design your own Beautiful HubSpot Forms; No coding necessary.

 

Drop by and say Hi to me on slack.

dennisedson
HubSpot製品開発チーム
HubSpot製品開発チーム

Mobile specific masthead

解決

@loubogatchek, i would agree with @tjoyce's opinion. 

In addition, you could change the background image to contain rather than cover. 

Might be good to reduce the logo size as wellDo_parents_treat_their_sons_and_daughters_differently_.png

tjoyce
名誉エキスパート | Elite Partner
名誉エキスパート | Elite Partner

Mobile specific masthead

解決

Can you link us to a preview page?

0 いいね!
loubogatchek
参加者

Mobile specific masthead

解決

I've edited the post to add a link - sorry I didn't think about it!

0 いいね!