-
AuthorPosts
-
September 4, 2023 at 3:51 pm #1418054
Hi,
I have a masonry overlay effect on desktop like this https://leukosarchitecture.es/en/projects/ to have on hover a white background with title in black.
In mobile there is no hover so you always see the title in black, no white background. I would like to add that white background (a little more transparent, so you can see the photo behind) in mobile so the text is easier to read.
I tried the following code on quick css but there was no way to make it work.
@media only screen and (max-width: 767px) { .av-masonry-entry-content { content:''; position:absolute; background: rgba(255,255,255, 0.65)!important; top:0; right:0; bottom:0; left:0; z-index:2; } }
This is the code for the desktop masonry that I currently have, if it helps you
/*CSS - Masonry, Hover, filtro por encima y texto */ #top .av-inner-masonry:before { content:''; position:absolute; background: rgba(0,0,0,.0)!important; top:0; right:0; bottom:0; left:0; z-index:2; } #top .av-inner-masonry:hover:before { background: rgba(255,255,255, 0.85)!important; transition:all .5s cubic-bezier(0.63, 0.7, 0.55, 1.03); }
- This topic was modified 1 year, 2 months ago by Xiscoj.
September 5, 2023 at 7:20 am #1418116Hey Xiscoj,
Thank you for the inquiry.
The following css code should re-enable the masonry caption overlay on mobile view.
@media only screen and (max-width: 768px) { /* Add your Desktop Styles here */ #top .av-caption-style-overlay.av-hover-overlay- .av-masonry-item-with-image .av-inner-masonry-content { background: rgba(255, 255, 255, 0.5); } .avia_desktop .av-caption-on-hover .av-masonry-item-with-image .av-inner-masonry-content { opacity: 1; } }
Please make sure to toggle or temporarily disable the Enfold > Performance > File Compression settings in order to ensure that the changes take effect.
Best regards,
IsmaelSeptember 5, 2023 at 8:48 am #1418129Hi Ismael,
Worked like a charm.
Thank you very much for your help, it is fantastic.
You can close the thread.
September 5, 2023 at 3:16 pm #1418160Hi Xiscoj,
I’m glad that Ismael could help you :)
Thanks for using Enfold and have a great day!Best regards,
Nikko -
AuthorPosts
- The topic ‘Masonry overlay effect on mobile without hover’ is closed to new replies.