paula_ Posted February 15 Share Posted February 15 Hello, I'm currently working on a gallery stack for a website (https://www.juliamacchi.com/proyectos-a/project-two-llrgk-ppmcw). I want to achieve the same style as this gallery ( https://www.juliamacchi.com/proyectos-a). Specifically, I want the title and description to appear on top of each image within the gallery stack. I'd like the text to be aligned at the bottom left of each image and to have a dark overlay on the image to ensure readability. I've attempted to modify the gallery stack using custom CSS, but I haven't been successful in achieving the desired outcome. Could someone please assist me with this? Thank you! Link to comment
tuanphan Posted February 18 Share Posted February 18 (edited) Add this code to Website > Website Tools > Code Injection > Footer (DO NOT add to Custom CSS) <!-- Gallery Block - Stack - by @phuong - tpkl --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script> <script> $(document).ready(function() { $('.sqs-gallery').children('.image-wrapper').each(function(index) { var newVideoWrapper = $('<div class="newVideoWrapper"></div>'); $(this).next('.meta').appendTo(newVideoWrapper); $(this).appendTo(newVideoWrapper); $('.sqs-gallery').append(newVideoWrapper); }); }); </script> <style> .newVideoWrapper { position: relative; margin-bottom: 40px; } .newVideoWrapper .meta { position: absolute; bottom: 0; left: 0; background-color: rgba(255,255,255,0.5); width: 100%; } .newVideoWrapper .meta .meta-inside { margin: 0 !important; padding-left: 10px; padding-bottom: 20px; } </style> Result Edited February 18 by tuanphan Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment