The Easter Sale is on! Join now or renew your subscription with a 25% OFF! Read More

Support Forum

Main feature particle on mobile

Hi all,

I have a question about the Main feature particle.
In www.dafeine.nl I used it in the 'Coffee Connects' section:
the text "Koffie verbindt mensen" on the left - and the photo of Ralf on the right.

On a mobile phone, only the text block is visible, and the photo disappeared.

My question is, is this a property of this particle..., or am I doing something wrong?
I was hoping that on a phone, the photo would appear under the text.

Have a very nice evening!
Stefan

Accepted Answer

Sunday, July 31 2016, 12:42 AM - #Permalink
Hi Stefan,

by default the image section of the Main Feature particle is hidden on phones and tablets, but you can easily make it visible.
Here's what you need to do:

1. Add the following code to your custom.scss file:

.g-main-feature {
.image-block {
@include breakpoint(tablet-range) {
display: block;
}
@include breakpoint(mobile-only) {
display: block;
}
}
}


IMPORTANT: Make sure that you have the @import "dependencies"; code at the very top of your custom.scss file.

2. "Recompile CSS" in the Base outline.

This way the image will be visible on all devices.
The reply is currently minimized Show
Responses (12)
  • Accepted Answer

    Sunday, July 31 2016, 12:14 PM - #Permalink
    Thank you very much, Jordan, works perfectly!

    Have a nice Sunday,
    kind regards,
    Stefan
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, July 31 2016, 12:21 PM - #Permalink
    No problem Stefan :)

    Very good use of Milano, I really like it :)
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, January 03 2017, 11:30 AM - #Permalink
    Hi,

    good tip but the Link button is on the image.
    I'm using Royalty, So I have set the rule.

    .g-main-feature .image-bottom {
    padding-top: 15px;
    }


    I hope this information will be helpful
    Thank You
    Attachments:
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, January 03 2017, 05:54 PM - #Permalink
    Thank you Claudio!
    It might be helpful for other users as well ;)
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, October 04 2017, 01:51 AM - #Permalink
    Hi! I try this code on "Startup" but give me error,
    Undefined mixin breakpoint


    ¿It´s a different code?
    Thanks!
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, October 04 2017, 09:15 AM - #Permalink
    Hi Mario,

    No, the code is not different.
    Just make sure that you have the @import "dependencies"; code at the very top of your custom.scss file.
    For more details, please have a look at the Adding a Custom Style Sheet section in the official Gantry 5 documentation.
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, April 29 2018, 08:58 AM - #Permalink
    Ciao Ivo,

    I've a issue that I can't solve.
    Content is over the image.
    How can you help me?

    Thank You

    Web site
    Attachments:
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, April 29 2018, 04:05 PM - #Permalink
    Hi Claudio,

    You should either set the Image at the bottom option to "No" or add the following code to your custom.scss file:

    body {
    .g-main-feature {
    .image-bottom {
    @include breakpoint(mobile-only) {
    margin: 0;
    }
    }
    }
    }
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, April 29 2018, 08:30 PM - #Permalink
    Ciao Ivo

    I've set the Image at the bottom option to "No" and added this code


    .g-main-feature {
    .image-block {
    @include breakpoint(tablet-range) {
    display: block;
    }
    @include breakpoint(mobile-only) {
    display: block;
    }
    }
    }

    body {
    .g-main-feature {
    .image-bottom {
    @include breakpoint(mobile-only) {
    margin: 0;
    }
    }
    }
    }


    but doesn't work this

    .g-main-feature .image-bottom {
    padding-top: 15px;
    }


    :o
    Attachments:
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, April 29 2018, 09:20 PM - #Permalink
    Hello Claudio,

    The image-bottom class is added to the markup (HTML) only when the Image at the bottom option is set to "Yes".

    In my previous comment I didn't say to do both of the things. I set to do either one or the other. Either set the Image at the bottom option to "No" or add the code to your custom.scss file.

    Anyway, If you want the padding-top code to always be in effect then add the following code to your custom.scss file:

    .g-main-feature-image {
    padding-top: 15px;
    }
    The reply is currently minimized Show
  • Accepted Answer

    Monday, April 30 2018, 08:14 AM - #Permalink
    Ciao Ivo,

    indeed! I had noticed that it works anyway. :)

    Thank You
    The reply is currently minimized Show
  • Accepted Answer

    Monday, April 30 2018, 09:25 AM - #Permalink
    Great!
    I'm glad that it works now ;)
    The reply is currently minimized Show
Your Reply

Become an insider | Subscribe to our Newsletter
Subscribe to our mailing list and stay up-to-date with all our awesome releases, latest updates and amazing discount offers!