Viewing 30 posts - 1 through 30 (of 33 total)
  • Author
    Posts
  • #928290

    Hi there,

    I’ve been researching your forum and playing with this all day, and I got a code that’s working but need your help to make it perfect.

    1. When I touch gallery image on my ipad it shows black image highlight that’s bigger than just image.
    I need black overlay shape to be the same size as image alone.

    2. Title is transparent and same opacity as black overlay.
    I need title to be at 100% opacity.

    3. Also, is it possible to display on rollover any other text besides a title alone. Like subtitle or any other text as a description that I would like to include below existing title.

    This is a code that I have in my Quich CSS:

    .av-masonry-entry:before {
    content: attr(title);
    background: black;
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1000;
    text-align: center;
    line-height: 180px;
    opacity: 0;
    font-weight: bold;
    font-size: 24px;
    }

    .av-masonry-entry:hover:before {
    opacity: 0.5;
    }

    .av-masonry-entry:before {
    transition: all linear 0.2s;
    }

    Also in Masonry Gallery Content I have Overlay deactivated and not displaying element captions.

    Thank you for your help.

    Cheers, Alan

    #929382

    Hey amarkoc,

    Please edit the values in the below code to suit your site and add this code to the Quick CSS section under Enfold > General Styling or to your child theme’s style.css file:

    /*----------------------------------------
    // CSS - Masonry overlay animation 1
    //--------------------------------------*/
    
    /* Title and caption area */
    #top .av-inner-masonry-content {
    	background:rgba(15, 0, 56, 0.59)!important;
    	height:100%
    	} 
    /* Title text */
    #top .av-masonry .entry-title {
        background: gold;
    	display:inline-block;
        padding: 0 5px;
    	position: absolute!important;
        top: -100%;
    	transition:all .35s cubic-bezier(0.63, 0.7, 0.55, 1.03);
    	font-size:22px;
    	letter-spacing: .05em;
    	text-transform:uppercase;
    }
    /* Title text on hover*/
    #top .av-inner-masonry-content:hover .entry-title{
    	transition:all .5s ease;
    	top: 20px!important;
    }
    /* Disable the overlay on hover*/
    #top .av-inner-masonry-content:hover{	background:transparent!important; }
    /* Hide caption arrow */
    #top .avia-arrow {	background: transparent; }
    /* Hide date */
    #top span.av-masonry-date { display: none; }
    

    Best regards,
    Vinay

    #929442

    Hi Vinay,

    Thanks for providing enfold masonry examples. Unfortunately they don’t work well on my touch pad. On your masonry example animation 1 it seems to be stuttering a bit and it’s not seamless. Also, when you’re going over gallery images with that code sometimes it click on the image right away instead of just showing a hover state with the title which is my goal. Then when I touch hard (click) it goes to desired section.

    So again, is it possible for you to edit this existing code which perfectly hovers/animates/clicks my gallery:

    .av-masonry-entry:before {
    content: attr(title);
    background: black;
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1000;
    text-align: center;
    line-height: 180px;
    opacity: 0;
    font-weight: bold;
    font-size: 24px;
    transition: all linear 0.2s;
    }

    .av-masonry-entry:hover:before {
    opacity: 0.5;
    }

    … and at the same time.

    1. Make black image highlight overlay the same size as image, and not bigger as it is now.
    2. Separate the title and black overlay, so that I can make title 100% opacity on hover.
    3. I added excerpt to the first image on the gallery, so it would be nice for it to display as well.

    I really appreciate all your help.

    Cheers, Alan

    #930038

    Hi,

    Thank you for getting back to us, please post us your login credentials (in the “private data” field), so we can take a look at your backend.

    1. Install and activate ” Temporary Login Without Password “.
    2. Go to ” Users > Temporary Logins ” on the left-side menu.
    3. Click ” Create New “.
    4. Add the email address for the account ( you can use (Email address hidden if logged out) ), as well as the ” Role ” making that the highest possible and the expiry about four days
      ( do be sure that we have enough time to debug ).
    5. Click ” Submit “.
    6. You’ll now have a temporary account. Please provide us here in the private section the URL, so we can login and help you out.

    When your issue is fixed, you can always remove the plugin!
    If you prefer to not use the plugin, you can manually create a admin user and post the login credentials in the “private data” field.

    Best regards,
    Vinay

    #930098

    Hello Vinay,
    Installed Temp login plugin and below is login link.
    Also, uploaded 3 jpgs with links below in step by step of what my perfect hover state would be.
    Thank you for all your help. I really appreciate all your work.
    Cheers, Alan

    #930115

    Hi,

    The cod you had earlier does not support title and background to have different z-index so we have modified it a bit and added to Quick CSS section. Please review the site and let us know if you have any questions ;)

    /* Masonry overlay */
    
    .av-masonry-entry:before {
    content: attr(title);
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1000;
    text-align: center;
    line-height: 180px;
    opacity: 0;
    font-weight: bold;
    font-size: 24px;
    transition: all linear 0.2s;
    }
    
    .av-masonry-entry:hover:before {
    opacity:1;
    }
    .av-masonry-entry:hover .av-masonry-outerimage-container:before {
    background: rgba(0, 0, 0, 0.6);
    position: absolute;
    content:'';
    width: 100%;
    height: 100%;
    z-index: 999;
    transition: all linear 0.2s;
    }

    Best regards,
    Vinay

    #930128

    Thank you Vinay,

    I changed in your code text size and transition to 0.4s.

    1. Is it possible to dead center title as now it seems to be a bit to the right. I think title is now still lining up to previous oversized black hover overlay.

    2. Is it possible to fade in 0.4s that black overlay, same as the text.

    3. When I rollover the image title font starts as black and then fades into a blue. Is it possible for title text to start as 0% opacity and then to 100% opacity as it is now, and where can I change that blue color?

    Cheers, Alan

    #930578

    Hi,

    I’m working on your ticket. These changes may take a little while. I will keep you updated with the results soon.

    Best regards,
    Vinay

    #931411

    Hey!

    I just noticed you have disabled the overlay option in the masonry element and trying to force display the title via custom code.

    Is there any specific reason why you took this approach?

    We recommend activating the overlay in the element option as the current approach will cause a conflict with the existing titles. To fix this will snowball to another issue.

    Let us know if you are ok with activating the overlay option available in the element options?
    If you need any further modifications we will be happy to help :)

    Regards,
    Vinay

    #931479

    Hi Vinay,

    Please do whatever you need to to make it work properly.

    I don’t really know what I’m doing.

    Thank you, Alan

    #931687

    Hi,

    I have activated the overlay from the masonry element options. Please review the site now :)

    The following code was removed from the quick CSS to avoid conflict.

    /* Masonry overlay */
    
    .av-masonry-entry:before {
    content: attr(title);
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1000;
    text-align: center;
    line-height: 180px;
    opacity: 0;
    font-weight: bold;
    font-size: 18px;
    transition: all linear 0.4s;
    }
    
    .av-masonry-entry:hover:before {
    opacity:1;
    transition: all linear 0.4s;
    }
    .av-masonry-entry:hover .av-masonry-outerimage-container:before {
    background: rgba(0, 0, 0, 0.3);
    position: absolute;
    content:'';
    width: 100%;
    height: 100%;
    z-index: 999;
    transition: all linear 0.4s;
    }

    Best regards,
    Vinay

    #931689

    Hi Vinay,

    Now I remembered why I had that previous code and I deactivated overlay from masonry element options. It’s because this overlay doesn’t work with my ipad/iphone. With activated overlay it’s always in hove state.

    What code can I use with activated overlay as you have it now to work the same way on desktop, tablets and smart phones?

    Thank you, Alan

    #931980

    Hi!

    Thank you for the clarification. Even if we use custom CSS the hover feature will not be supported in touch devices due to the browser limitations. However, if you do not like the titles to show on the mobile device we can hide them using custom code.

    
    @media only screen and (max-width: 767px) {
    #top .av-caption-style-overlay .av-masonry-item-with-image .av-inner-masonry-content {
    display:none;
    }}

    Best regards,
    Vinay

    • This reply was modified 6 years, 8 months ago by Vinay.
    #932047

    Hi Vinay,

    Of course, I want the same hover feature across all platforms and devices.

    What code I can use to achieve that?

    Thanks, Alan

    #932468

    Hi,

    As we discussed earlier touch device do not support hover feature. As soon as you click on the link the users will be re-directed to a different section of the page. If you see an example that you like on any site please share it and we will see what best we can do for you to create a similar effect :)

    Best regards,
    Vinay

    #932475

    Hi Vinay,

    Here is where I got the original code where hover state works with deactivated overlay from masonry element options:
    https://kriesi.at/support/topic/masonry-portfolio-hover-colour-and-centre-title/

    I know you said it this might cause me some problems down the road, but it works beautifully across all platforms and devices in this masonry gallery which is discussed in the same thread:
    http://peacheyphotography.co.uk/

    Thank you for all your help!

    Alan

    #933197

    Hi,

    The login URL has expired.
    Please de-activate the overlay and captions in the element settings.

    Add the below code to Quick CSS

    /* Masonry overlay */
    
    .av-masonry-entry:before {
    content: attr(title);
    position: absolute;
    color: #FFF;
    width: 100%;
    height: auto;
    z-index: 1000;
    text-align: center;
    line-height: auto;
    opacity: 0;
    font-weight: bold;
    font-size: 18px;
    transition: all linear 0.4s;
    top:50%;
    transform: translateY(-50%);
    }
    
    .av-masonry-entry:hover:before {
    opacity:1;
    transition: all linear 0.4s;
    }
    .av-masonry-entry:hover .av-masonry-outerimage-container:before {
    background: rgba(0, 0, 0, 0.3);
    position: absolute;
    content:'';
    width: 100%;
    height: 100%;
    z-index: 999;
    transition: all linear 0.4s;
    }

    Let us know if you have any questions, we are happy to help :)

    Best regards,
    Vinay

    #935061

    Hi Vinay,

    I extended temporary login by another week.

    I put in the code you gave me and there are a several tweaks I need done to make it perfect, as not this code works fine on all platforms and devices.

    1. Is it possible to horizontally center title as now it seems to be a bit to the right. I think title is now still lining up to previous oversized black hover overlay.

    2. Is it possible to fade in 0.4s that black overlay, same as the text.

    3. Is it possible to show excerpt below the title as on the screencap link below.

    Cheers, Alan

    #935201

    Hi,

    1. It is horizontally center now but if you like to play around please adjust the “left:48%” value for “.av-masonry-entry:before”.

    2. I have added the fade in and fade out it works fine on my end please refresh the cache and review the same.

    3. We are hiding the excerpts using CSS to force display and position the title attribute which cannot relate to the excerpt position and hence both will overlay. It will not be center aligned and again snowball to other conflicts.

    Best regards,
    Vinay

    #935232

    Hi Vinay,

    1. Great, the title in now centered and I moved it up to top: 25% to give some room to Excerpt text.
    2. However there is no black 50% opacity 0.4s fade on/off on hover on my end. No black across all devices and platforms; desktop or ipad and iphone. I cleared my history and cache.
    3. To make Title and Excerpt work is it possible to make fixed Excerpt position to always show below Title. If title is at top: 25% vertical position, I guess Excerpt would be fine at top: 60% vertical position.
    4. Excerpt fades on/off on hover just fine on my desktop, but it’s always on on my ipad and iphone. is it possible for excerpt to fade in/out the same as title on my ipad/iphone, as title fades on/off just fine.

    Thank you Vinay for all your help.

    Best regards, Alan

    #936617

    Hi,

    The transitions work on my end on chrome and FF please let us know which browser are you facing the issue on?

    Issue 3. and 4. As adviced earlier this code will snowball to different issues, displaying excerpt is one of them.

    Unfortunately, it would require quite some time and customization of the theme to achieve this, so I am sorry to tell you that this is not covered by our support. However, if it’s really important for you to get this done, you can always hire a freelancer to do the job for you :)

    Best regards,
    Vinay

    #936758

    Hi Vinay,

    2. I’m as well using on my desktop Chrome and on ipad/iphone FireFox but black 50% opacity background on fade in/out is not showing. Cleared history and website data as well.

    Again this original code from the beginning of this thread shows black background perfectly when hovering over, so if there is a way of combining it with your current code that displays just title very nicely:

    .av-masonry-entry:before {
    content: attr(title);
    background: black;
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1000;
    text-align: center;
    line-height: 180px;
    opacity: 0;
    font-weight: bold;
    font-size: 24px;
    transition: all linear 0.2s;
    }
    .av-masonry-entry:hover:before {
    opacity: 0.5;
    }

    3-4. I understand there could be issues if you’re customizing Masonry gallery and then all other Masonry galleries would work to that customized way. But can’t only this gallery be customized with custom ID Attribute?

    If you can’t help me any more that’s fine, you can close this thread.

    Thank you for all your help I really appreciate all your hard work.

    Best regards, Alan

    #937430

    Hi amarkoc,

    Like Vinay said, that is possible with customization, but that kind of customization is out of the scope of our support.

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #937446

    Hello Victoria,

    Sure, I would like for someone to address and help me resolve my original question.

    “Hi there,

    I’ve been researching your forum and playing with this all day, and I got a code that’s working but need your help to make it perfect.

    1. When I touch gallery image on my ipad it shows black image highlight that’s bigger than just image.
    I need black overlay shape to be the same size as image alone.

    2. Title is transparent and same opacity as black overlay.
    I need title to be at 100% opacity.

    3. Also, is it possible to display on rollover any other text besides a title alone. Like subtitle or any other text as a description that I would like to include below existing title.

    This is a code that I have in my Quick CSS:

    .av-masonry-entry:before {
    content: attr(title);
    background: black;
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1000;
    text-align: center;
    line-height: 180px;
    opacity: 0;
    font-weight: bold;
    font-size: 24px;
    transition: all linear 0.2s;
    }

    .av-masonry-entry:hover:before {
    opacity: 0.5;
    }

    Also in Masonry Gallery Content I have Overlay deactivated and not displaying element captions.

    Thank you for your help.

    Cheers, Alan”

    If too difficult no need to resolve 3rd point about showing extra (excerpt) text.

    Thank you, Alan

    #937854

    Hello, can someone please help me out? Thank you, Alan

    #938111

    Hi,

    Thank you for the update. Remove the black background from the title container and then apply to the item’s inner container.

    .av-masonry-entry .av-inner-masonry:before {
        content: '';
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,.8);
        display: block;
        z-index: 100;
        position: relative;
    }

    Best regards,
    Ismael

    #938147

    Hello Ismael,

    Thank you for a quick reply!

    I inserted your code after current one so now it looks like this:

    /* Masonry overlay */

    .av-masonry-entry:before {
    content: attr(title);
    color: #FFF;
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 999;
    text-align: center;
    line-height: 180px;
    opacity: 0;
    font-weight: bold;
    font-size: 20px;
    transition: all linear 0.2s;
    }
    .av-masonry-entry:hover:before {
    opacity: 1;
    }
    .av-masonry-entry .av-inner-masonry:before {
    content: ”;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,.3);
    display: block;
    z-index: 100;
    position: relative;
    }

    1. Black background now looks good as it covers only the image, but it’s always on instead of showing up only on hover state as the title.

    2. Also I would like to center titles horizontally as now it’s centered to outer box of masonry-entry instead of inner-masonry. Vinay managed to center it up in it’s latest code, but for a life of me I can’t figure it out and implement it with current code.

    I really appreciate your help. Thank you very much!

    Cheers, Alan

    #938840

    Hi,

    1.) Set the opacity to 0 on initial load and then set it to 1 on hover. Just replace the previous css modification with the following code.

    .av-masonry-entry .av-inner-masonry:before {
    content:'';
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,.3);
    display: block;
    z-index: 100;
    position: relative;
    opacity: 0;
    }
    
    .av-masonry-entry:hover .av-inner-masonry:before {
    opacity: 1
    }

    2.) Adjust the line-height property value of the “.av-masonry-entry:before” element. It should be almost the same as the height of the masonry item itself.

    .av-masonry-entry:before {
        content: attr(title);
        color: #FFF;
        position: absolute;
        width: 100%;
        height: 100%;
        z-index: 999;
        text-align: center;
        line-height: 290px;
        opacity: 1;
        font-weight: bold;
        font-size: 20px;
        transition: all linear 0.2s;
    }

    Best regards,
    Ismael

    #938848

    Edit : oh wow – did not know that content: attr(title) works !

    https://css-tricks.com/css-content/

    • This reply was modified 6 years, 7 months ago by Guenni007.
    #938895

    Hi Ismael,

    I played with the code you gave me and come up with this one that finally works with my masonry across all platforms and devices (with deactivated overlay in masonry, because activated masonry doesn’t work on ipad/iphone) the way I wanted:

    /* Masonry overlay */

    .av-masonry-entry:before {
    content: attr(title);
    color: #FFF;
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 999;
    text-align: center;
    line-height: 180px;
    opacity: 0;
    font-weight: bold;
    font-size: 20px;
    transition: all linear 0.2s;
    }
    .av-masonry-entry:hover:before {
    opacity: 1;
    }
    .av-masonry-entry .av-inner-masonry:before {
    content: ”;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,.3);
    display: block;
    z-index: 100;
    position: absolute;
    transition: all linear 0.2s;
    opacity: 0;
    }
    .av-masonry-entry:hover .av-inner-masonry:before {
    opacity: 1;
    }

    If you could be so kind and let me know how to:

    2. Also I would like to center titles horizontally as now it’s centered to outer box of masonry-entry instead of inner-masonry. Vinay managed to center it up in it’s latest code, but for a life of me I can’t figure it out and implement it with current code.

    I really appreciate your help. Thank you very much!

    Cheers, Alan

Viewing 30 posts - 1 through 30 (of 33 total)
  • The topic ‘Enfold Masonry gallery image hover rollover for tablets ipads smartphones’ is closed to new replies.