Jump to content

Mobile Banner Height

Recommended Posts

  • Replies 9
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

Add to Home > design > custom CSS

@media screen and (max-width:640px) {
.banner-thumbnail-wrapper.has-description, .desc-wrapper {
    height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
}

 

Edited by tuanphan

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment

Thanks a lot, it works exactly as expected!

Another question: right now the text is not exactly vertically centered in the cropped image on mobile, how can I make it vertically centered? See attached to see what I mean.

Thanks,

5730.jpg

Link to comment

One last question: would it be possible to do the same thing also for the desktop banners, but manage the desktop banner height separately from the mobile banner height?

I would need the same thing also for dekstop: to be able to adjust the banner height and have the text centered in the image.

Thanks,

Link to comment
@media screen and (min-width:641px) {
.banner-thumbnail-wrapper.has-description, .desc-wrapper {
    height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.