Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #317437

    Hey,

    What CSS do I need to add so that the hover on my masonry portfolio has a colour of my choosing, and the title appears in the centre, similar to this: http://peacheyphotography.co.uk/

    Many thanks.

    #317796

    Hey!

    Try adding this code to the Quick CSS:

    .av-masonry-entry:before {
        content: attr(title);
        background: red;
        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: 1;
    }
    
    .av-masonry-entry:before{
        transition: all linear 0.2s;
    }

    Cheers! 
    Josue

    #358062

    Hi Josue,

    Can this be done with the standard portfolio grid as well?

    Best, David.

    #358091

    Hi David!

    Try with this:

    .image-overlay {
        display: none !important;
    }
    .grid-image:before {
        content: attr(title);
        background: red;
        position: absolute;
        width: 100%;
        height: 100%;
        z-index: 1000;
        text-align: center;
        line-height: 180px;
        opacity: 0;
        font-weight: bold;
        font-size: 24px;
    }
    
    .grid-image:hover:before {
        opacity: 1;
    }
    
    .grid-image:before{
        transition: all linear 0.2s;
    }

    Cheers!
    Josue

    #358214
    This reply has been marked as private.
    #358402
    This reply has been marked as private.
    #358660

    Hey David!

    Use this:

    .image-overlay-inside:before{
    	display: none !important;
    }
    .image-overlay {
        background: #ec1164;
    }
    .grid-image:before {
        content: attr(title);
        position: absolute;
        width: 100%;
        height: 100%;
        z-index: 1000;
        text-align: center;
        opacity: 0;
        font-weight: 200;
        font-size: 24px;
        color: #ffffff !important;
        top: 50%;
    }
    
    .grid-image:hover:before {
        opacity: 0.9;
    }
    
    .grid-image:before{
        transition: all linear 0.2s;
    }
    
    .grid-content {
        display: none !important;
    }

    Cheers!
    Josue

    #389071

    Hi, sorry for the long response. Thanks for the code, but is there anyway to centre the text across all devices? When I shrink the browser down and the masonry grid shrinks, the title on each grid aren’t centered anymore.

    #391025

    Hey!

    Hmm, they appear centered on my end on all screen sizes. Clear your browser cache and take a screenshot of what your seeing.

    Also let us know what operating system and browser your using.

    Regards,
    Elliott

    #412094

    Hi!
    Can i have the title, excerpt and read more button, in the hover of the blog grid?
    Like this theme: http://solopine.com/hickory/ but only in hover?

    Thanks!

    #412497

    Hey!

    Can you post a link to your blog grid?

    Regards,
    Josue

    #419226

    Thats my blog grid:

    I did it by negative margin-top of the content.
    But i really wanna do it in a php way.

    Can you help me?
    Thanks!

    #419227

    Thats my blog grid:

    I did it by negative margin-top of the content.
    But i really wanna do it in a php way.

    Can you help me?
    Thanks!

    #419661

    Hi!

    I think that’s a valid method, but i’d change it to position: absolute; top: 0; like:

    #block-post article .slide-content {
        position: absolute;
        top: 0;
    }

    Regards,
    Josue

    #420383

    Yes! that was de plus I needed!
    Thanks!

Viewing 15 posts - 1 through 15 (of 15 total)
  • The topic ‘Masonry Portfolio hover colour and centre title’ is closed to new replies.