MattBairdSound Posted June 25 Share Posted June 25 Site: https://www.mattbairdsound.com/drama-1 Password: sound For each of the images in this gallery I'd like to make 4 lines of text appear when you mouse over. Is that possible? Thank you! Link to comment
Solution MayaViolet Posted June 25 Solution Share Posted June 25 Hey @MattBairdSound - You should be able to use the gallery caption feature and some simple css to achieve this outcome. In order to differentiate the hover text from your current caption title text, you can wrap the hover text in html tags, so that we can target specifically this text. For example, if you have "Count Abdulla" in the caption already, add "<h2> hover text here </h2>" after in in the same line. Here's the CSS I would add: .gallery-caption-wrapper { overflow: visible; // this allows your hover text to be visible when we make it an absolute element, and move it up to appear on top of the image - if you want it to appear normally beneath the title, ignore this, and remove "position:absolute" below } .gallery-caption-wrapper h2 { position: absolute; text-align: center; width: 100% !important; transform: translateY(-250%); // this moves the text up - can be adjusted to match your needs margin: 0 !important; transition: .5s; // allows for smooth fade in/out when we adjust opacity opacity: 0; } .gallery-grid-item:hover { .gallery-caption-wrapper h2 { opacity: 1; transition: .5s; } .gallery-grid-item-wrapper img { opacity: 0.8; // changes opacity of image so text is more legible on hover } } Depending on where and how you want it to appear, the above can be adjusted. Hope this helps! tuanphan 1 Link to comment
MattBairdSound Posted June 27 Author Share Posted June 27 Thank you so much! is there a way to have a different transform % value for mobile? Link to comment
tuanphan Posted June 28 Share Posted June 28 18 hours ago, MattBairdSound said: Thank you so much! is there a way to have a different transform % value for mobile? Add this code under /* code for mobile */ @media screen and (max-width:767px) { .gallery-caption-wrapper h2 { transform: translateY(-150%) !important; } } 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
MattBairdSound Posted June 30 Author Share Posted June 30 Thank you both very very much for your <h2> code! I've used <h3> and <h4> too for different transform values but when I use <h5> the text appears to be bold. Is it possible to fix that? Look at this page: https://www.mattbairdsound.com/misc-tv Password: sound You can see the problem 7 rows down on the image 'Neither Fish Nor Fowl: The Story Of An Anglo Irish Family'. Link to comment
tuanphan Posted July 3 Share Posted July 3 Add to Design > Custom CSS .gallery-caption-wrapper h5 { font-weight: normal !important; } 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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment