Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1347066

    Hi,
    is it possible to style the flexible masonry portfolio to get a “looser” appearance like this? Perhaps like the fixed masonry via tags that produce a certain padding?
    Thank you for suggestions.
    Best regards,
    Vera
    Grid masonry

    • This topic was modified 2 years, 5 months ago by Vera.
    #1347093

    Hey Vera,

    Thank you for the inquiry.

    You can play around with the Styling > Masonry Settings > Size Settings and maybe adjust the padding around the masonry images a bit using css. Please provide the site URL in the private field so that we can check the element directly.

    Best regards,
    Ismael

    #1347158

    Hi Ismael,

    Thank you for your suggestions. If you can tell me the class of the element to play with (by adjusting the padding), this would help. As I want the images to be shown with their proportional length and height I suppose I have to use the flexible masonry. But there I couldn’t find the right elements to adjust so that for example the image from a portfolio with the tag “portrait” does not fill up the whole width of a column but has a certain padding to the left and right.

    Best regards,
    Vera

    #1347232

    Hi,

    Thank you for the update.

    You can use this css code to adjust the padding around the masonry image.

    .av-masonry-container .av-masonry-entry .av-masonry-image-container img {
        padding: 10%;
    }
    

    To apply different padding values to different items, try to use the nth-child selectors.

    Example:

    .av-masonry-container .av-masonry-entry:nth-child(1) .av-masonry-image-container img {
        padding: 15%;
    }
    

    The nth-child(1) selector in the css code above will target the first masonry item and adjust the padding of the image within it. More info about nth-child selectors can be found here.

    // https://css-tricks.com/almanac/selectors/n/nth-child/

    Best regards,
    Ismael

    #1347401

    Hi Ismael,
    thank you for the instructions. They work well.
    Is it also possible to let an image with the tag “landscape” take the width of two columns like in the version for the fixed masonry?
    Thank you.
    Best regards,
    Vera

    #1347693

    Hi,

    Glad to know that the suggestions above are working. Regarding the image orientation, you can modify this code in the enfold/config-templatebuilder/avia-shortcode-helpers/class-avia-masonry.php file around line 605, but we are not sure how this would affect other masonry layouts.

    	if( $size == 'fixed' )
    				{
    					if( ! empty( $attachment ) || ! empty( $before_content ) )
    					{
    						if( $auto )
    						{
    							$class_string .= $this->ratio_check_by_image_size( $attachment );
    						}
    
    						if( $manually )
    						{
    							$class_string .= $this->ratio_check_by_tag( $entry['tags'] );
    						}
    					}
    				}
    

    You can remove the condition $size == ‘fixed’ completely or just replace it with true.

    if( true ) {
      // rest of the code
    }
    

    Best regards,
    Ismael

    #1348679

    Hi Ismael,
    this has no effect on the orientation. An image taged as landscape still takes only the width of one column. Do I have to adjust perhaps also some css?
    Thank you.
    Best regards,
    Vera

    #1348746

    Hi,

    Sorry for the delay. Try to replace the whole code block with the following code.

    	
    $class_string .= $this->ratio_check_by_tag( $entry['tags'] );
    

    This modification should check for the orientation tags and apply the appropriate class name to the masonry items regardless of the other conditions.

    Best regards,
    Ismael

    #1348832

    Hi,

    it works! Thanks a lot for your great support!

    Best regards,
    Vera

    #1348849

    Hi,

    Great, I’m glad that Ismael could help you out. Please let us know if you should need any further help on the topic or if we can close it.

    Best regards,
    Rikard

    #1349009

    Hi Rikard,

    yes thank you, you can close this topic.

    Best regards,
    Vera

    #1349018

    Hi,

    Thanks for letting us know, I’ll close this thread for now then. Please open a new thread if you should have any further questions or problems.

    Best regards,
    Rikard

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Styling Masonry Portfolio’ is closed to new replies.