Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

Limit Gallery Block Image Size


Rafida

Question

Site URL: https://www.rafida.org

Hey,

I'm trying to limit the maximum size of an image on mobile. 
This code used to work for image blocks, but not working for gallery blocks.
The reason I switched to a single image gallery rather than an image block is for the video lightbox function.

The image I'm trying to restrict is the large orange play button at the top of the home page.
Any idea why it's not working?

website: rafida.org
pass: lastphasetesting3

 

- Code provided below.
- Screenshot provided of single image gallery I'm trying to restrict on mobile

 

@media screen and (max-width:640px) {
div#block-yui_3_17_2_1_1600057330272_455 img {
    width: 50% !important;
    height: auto !important;
    transform: translateX(-50%);
    left: 50% !important;
    top: 0 !important;
}
div#block-yui_3_17_2_1_1600057330272_455 .image-block-wrapper {
    padding-bottom: 50% !important;
}
}

 

Screenshot 2020-09-14 at 05.30.14.png

Link to post
  • Answers 2
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

Posted Images

2 answers to this question

Recommended Posts

  • 0

Add to Home > design > Custom CSS

/* Play icon mobile */
@media screen and (max-width:640px) {
div#block-yui_3_17_2_1_1600056103323_14741 {
    width: 50%;
    margin: 0 auto;
}
}

 

You can send your question to my email to get faster answer. / How to Setup Password & Share URL 

-- I'm Tuan, work for a non-profit project (build free libraries). I check the forum once or twice a day to help out the community. If you don't see me answering your question, you can send it to the email above. 

Link to post

Create an account or sign in to comment

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


×
×
  • Create New...