Button disappear on mobile version but show on Web version

Hello!

can someone help me fix this error on my store? The slideshow button appears on web, but not on mobile.

{%- assign arrows = arrows | default: section.settings.show_arrows -%}
{%- assign dots = dots | default: section.settings.show_dots -%}
{%- assign fadein = fadein | default: section.settings.show_fadein -%}
{%- assign autoplay = autoplay | default: section.settings.autoplay -%}
{%- assign time = time | default: section.settings.autorotate_speed | times: 1000 -%}

{% if section.settings.custom_color %}
    {% render 'customcolor_slideshow' %}
{% endif %}

    
 1 %}
            data-slick='{
                "rows": 0,
                "dots": true,
                "arrows": false,
                "fade": {{ fadein }},
                "autoplay": {{ autoplay }},
                "autoplaySpeed": {{ time }},
                "infinite": true,
                "adaptiveHeight": true,
                "slidesToScroll": 1,
                "mobileFirst": true,
                "prevArrow": "

", 
                "nextArrow": "
",
                "responsive": [
                    {
                        "breakpoint": 1100,
                        "settings": {
                            "dots": {{ dots }},
                            "arrows": {{ arrows }}
                        }
                    }
                ]
            }'
        {% endif %}>
        {% for block in section.blocks %}
            {%- assign img_url = block.settings.image_slide | img_url: 'master' -%}
            
                {% if block.type == 'image'%}
                    

                        {% if block.settings.image_slide == blank %}
                            

                                1920x600
                                {{ 'lifestyle-1' | placeholder_svg_tag: 'placeholder-svg' }}
                            

                        {% else %}
                            {% if forloop.index == 1 %}
                                
                            {% else %}
                                
                            {% endif %}
                        {% endif %}
                        {% if block.settings.link != blank %}{% endif %}
                    

                {% else %}
                    {% if block.settings.video_link != blank %}
                        
                            

                                
                                <iframe class="youtube-player" id="player_{{ block.id }}" width="100%" height="100%" data-video-id="{{ block.settings.video_link }}" src="https://www.youtube.com/embed/{{ block.settings.video_link }}?enablejsapi=1&rel=0&autoplay=0&mute=1" frameborder="0" allowfullscreen=""></iframe>
                            

                        

                    {% elsif block.settings.video_mp4_link != blank %}
                        
                            

                                
                            

                        

                    {% endif %}
                {% endif %}
                {% if block.settings.heading != blank or block.settings.sub-heading != blank or block.settings.slide-des != blank or block.settings.button_slide1 != blank or block.settings.button_slide2 != blank %}
                    
                        {% if block.settings.sub-heading != blank %}
                            ### 
                                {{ block.settings.sub-heading }}
                            
                        {% endif %}

                        {% if block.settings.heading != blank %}
                            ## 
                                {{ block.settings.heading }}
                            
                        {% endif %}

                        {% if block.settings.slide-des != blank %}
                            

                                {{ block.settings.slide-des }}
                            

                        {% endif %}

                        {% if block.settings.slide_countdown != blank %}
                            
                            

                        {% endif %}

                        {% if block.settings.button_slide1 != blank %}
                            
                                {{ block.settings.button_slide1 }}
                            
                        {% endif %}

                        {% if block.settings.button_slide2 != blank %}
                            
                                {{ block.settings.button_slide2 }}
                            
                        {% endif %}
                    

                {% endif %}
            

        {% endfor %}
    

{% schema %}
    {
        "name": "Slideshow",
        "max_blocks": 9,
        "settings": [
            {
                "type": "header",
                "content": "General"
            },
            {
                "type": "select",
                "id": "slide_height",
                "label": "Slide Height",
                "default": "medium",
                "options": [
                    {
                        "label": "Adapt to image",
                        "value": "adapt"
                    },
                    {
                        "label": "Small",
                        "value": "small"
                    },
                    {
                        "label": "Medium",
                        "value": "medium"
                    },
                    {
                        "label": "Large",
                        "value": "large"
                    }
                ]
            },
            {
                "type": "select",
                "id": "text_size",
                "label": "Text size",
                "default": "large",
                "options": [
                    {
                        "label": "Small",
                        "value": "small"
                    },
                    {
                        "label": "Medium",
                        "value": "medium"
                    },
                    {
                        "label": "Large",
                        "value": "large"
                    }
                ]
            },
            {
                "type": "checkbox",
                "id": "show_arrows",
                "label": "Show Arrows",
                "default": true
            },
            {
                "type": "checkbox",
                "id": "show_dots",
                "label": "Show dots",
                "default": true
            },
            {
                "type": "checkbox",
                "id": "show_fadein",
                "label": "Effect Fade In",
                "default": false
            },
            {
                "type": "checkbox",
                "id": "autoplay",
                "label": "Slideshow Auto Play",
                "default": true
            },
            {
                "type": "range",
                "id": "autorotate_speed",
                "label": "Change slides every",
                "max": 9,
                "min": 3,
                "step": 1,
                "unit": "s",
                "default": 5
            },
            {
                "type": "header",
                "content": "Custom Color"
            },
            {
                "type": "checkbox",
                "id": "custom_color",
                "label": "Turn on custom color",
                "default": false
            },
            {
                "type": "color",
                "id": "color_heading",
                "label": "Heading Color"
            },
            {
                "type": "color",
                "id": "color_text",
                "label": "Description Color"
            },
            {
                "type": "color",
                "id": "color_button_text",
                "label": "Button 1 Text Color"
            },
            {
                "type": "color",
                "id": "color_button_border",
                "label": "Button 1 Border Color"
            },
            {
                "type": "color",
                "id": "color_button_bg",
                "label": "Button 1 Background Color"
            },
            {
                "type": "color",
                "id": "color_button_text_hover",
                "label": "Button 1 Text Color Hover"
            },
            {
                "type": "color",
                "id": "color_button_border_hover",
                "label": "Button 1 Border Color Hover"
            },
            {
                "type": "color",
                "id": "color_button_bg_hover",
                "label": "Button 1 Background Color Hover"
            },
            {
                "type": "color",
                "id": "color_button_text2",
                "label": "Button 2 Text Color",
                "default": "#ffffff"
            },
            {
                "type": "color",
                "id": "color_button_border2",
                "label": "Button 2 Border Color",
                "default": "#667377"
            },
            {
                "type": "color",
                "id": "color_button_bg2",
                "label": "Button 2 Background Color",
                "default": "transparent"
            },
            {
                "type": "color",
                "id": "color_button_text_hover2",
                "label": "Button 2 Text Color Hover",
                "default": "#26292d"
            },
            {
                "type": "color",
                "id": "color_button_border_hover2",
                "label": "Button 2 Border Color Hover",
                "default": "#ffffff"
            },
            {
                "type": "color",
                "id": "color_button_bg_hover2",
                "label": "Button 2 Background Color Hover",
                "default": "#ffffff"
            },
            {
                "type": "color",
                "id": "color_arrow",
                "label": "Button Arrows Color"
            },
            {
                "type": "color",
                "id": "color_arrow_border",
                "label": "Button Arrows Border Color"
            },
            {
                "type": "color",
                "id": "color_dot",
                "label": "Button Dots Color"
            },
            {
                "type": "color",
                "id": "color_dot_border",
                "label": "Button Dots Border Color"
            },
            {
                "type": "color",
                "id": "color_text_countdown",
                "label": "Countdown Color"
            },
            {
                "type": "color",
                "id": "color_countdown_border",
                "label": "Countdown Border Color",
                "default": "#4b5b60"
            }
        ],
        "blocks" : [
            {
                "type": "image",
                "name": "Image SlideShow",
                "settings":[
                    {
                        "type": "header",
                        "content": "Image"
                    },
                    {
                        "type": "image_picker",
                        "id": "image_slide",
                        "label" : "Select Image",
                        "info": "Recommended Image: Width x Height (1920 x 720)px"
                    },
                    {
                        "type": "header",
                        "content": "Content"
                    },
                    {
                        "type": "select",
                        "id": "alignment",
                        "label": "Text alignment",
                        "default": "left",
                        "options": [
                        {
                            "value": "left",
                            "label": "Left"
                        },
                        {
                            "value": "middle",
                            "label": "Center"
                        },
                        {
                            "value": "right",
                            "label": "Right"
                        }
                        ]
                    },
                    {
                        "type" : "text",
                        "id" : "heading",
                        "label" : "Heading",
                        "default" : "Milancelos"
                    },
                    {
                        "type" : "text",
                        "id" : "sub-heading",
                        "label" : "Sub Heading",
                        "default" : "New Arrivals"
                    },
                    {
                        "type" : "textarea",
                        "id" : "slide-des",
                        "label" : "Slide Description",
                        "default": "Pellentesque habitant morbi tristique senectus et netus de malesuada fames den turpis megetas."
                    },
                    {
                        "type" : "text",
                        "id" : "slide_countdown",
                        "label" : "Countdown Time",
                        "info" : "2020/12/12 12:12:00"
                    },
                    {
                        "type" : "text",
                        "id" : "button_slide1",
                        "label" : "Button Text 1",
                        "default" : "Shop Now"
                    },
                    {
                        "type" : "url",
                        "id" : "link1",
                        "label" : "Button Link 1"
                    },
                    {
                        "type" : "text",
                        "id" : "button_slide2",
                        "label" : "Button Text 2"
                    },
                    {
                        "type" : "url",
                        "id" : "link2",
                        "label" : "Button Link 2"
                    }
                ]
            },
            {
                "type": "video",
                "name": "Video Slider",
                "settings": [
                    {
                        "type": "header",
                        "content": "Youtube"
                    },
                    {
                        "type": "text",
                        "id": "video_link",
                        "label": "YouTube video ID",
                        "default": "eTCtDW7O1aM",
                        "info": "[Find your YouTube video ID](https://docs.joeworkman.net/rapidweaver/stacks/youtube/video-id)."
                    },
                    {
                        "type": "header",
                        "content": "MP4"
                    },
                    {
                        "type": "text",
                        "id": "video_mp4_link",
                        "label": "Video link",
                        "info": "just choose one option: YouTube or MP4"
                    },
                    {
                        "type": "header",
                        "content": "Content"
                    },
                    {
                        "type": "select",
                        "id": "alignment",
                        "label": "Text alignment",
                        "default": "left",
                        "options": [
                        {
                            "value": "left",
                            "label": "Left"
                        },
                        {
                            "value": "middle",
                            "label": "Center"
                        },
                        {
                            "value": "right",
                            "label": "Right"
                        }
                        ]
                    },
                    {
                        "type" : "text",
                        "id" : "heading",
                        "label" : "Heading",
                        "default" : "Slideshow Heading"
                    },
                    {
                        "type" : "textarea",
                        "id" : "slide-des",
                        "label" : "Slide Description",
                        "default": "Use overlay text to give your customers insight into your brand. Select image and text that relates to your style and story."
                    },
                    {
                        "type" : "text",
                        "id" : "button_slide",
                        "label" : "Button Text",
                        "default" : "Shop The Collection"
                    },
                    {
                        "type" : "url",
                        "id" : "link",
                        "label" : "Slide link"
                    }
                ]
            }
        ],
        "presets": [{
            "name": "Slideshow",
            "category": "Slideshow",
            "blocks": [
                {
                    "type": "image"
                }
            ]
        }]
    }
{% endschema %}

attached slideshow code liquid.

Hello,
Please share your site url.
So that I can check and let you know the exact solution here.

https://cappelliuomo.myshopify.com/

pw: nicholas

@Paintilab please Go to Online Store->Theme->Edit code then go to assets/theme.css ->paste below code at the bottom of the file.

@media only screen and (max-width: 429px){
#shopify-section-1578474099783  .halo-slideshow .slideshow .slick-list .slick-track .item  .content--middle .slide-button{
    display: inline-block  !important;
}
}
1 Like

Add this css at the bottom of
Online Store->Theme->Edit code->Assets->theme.scss.liquid

#shopify-section-1578474099783 a.slide-button.btn.btn--primary.animated {
    display: inline-block !important;
}

it works! thank you, also do you know if there is a way to display the button smaller on mobile?

@Paintilab
please paste below code at the bottom of the file.

@media only screen and (max-width: 429px){
#shopify-section-1578474099783 a.slide-button.btn.btn--primary.animated {
   padding: 12px !important;
    min-width: 100px !important;
}
}
2 Likes

Add this css

@media only screen and (max-width: 429px){
#shopify-section-1578474099783 a.slide-button.btn.btn--primary.animated {
    padding: 12px 2px !important;
    min-width: 120px !important;
}
}

i added this code but still the size is the same on mobile/pc

Replace above code with

@media only screen and (max-width: 429px){
#shopify-section-1578474099783 a.slide-button.btn.btn--primary.animated {
    display: inline-block !important;
    padding: 10px !important;
    min-width: 70px !important;
}
}

still not working. :confused:

Replace above code with

@media only screen and (max-width: 767px){
#shopify-section-1578474099783 a.slide-button.btn.btn--primary.animated {
    display: inline-block !important;
    padding: 10px !important;
    min-width: 75px !important;
}
}

sadly still not working

@Paintilab Could you kindly DM me so that we can discuss further on it.
And else you can get connected with me on [email removed] so that I can assist you further in your requiremennt Thanks!

2 Likes