Shopify themes, liquid, logos, and UX
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
I want the Image banner section on the front page to be displayed with a different picture on the mobile version, because the image height on the mobile page is way too short which i really don't like even it's already set to "large". How can I do that?
Also, is it possible to change the text content position to bottom/top instead of just at the middle section?
Any help is greatly appreciated!
Solved! Go to the solution
This is an accepted solution.
Hey @Jason10
please try this code with dynamic options
{%- style -%}
@media screen and (min-width: 821px) {
{%if section.settings.about-image-main-mobile %}
.collection-banner-container {
background-image: url('{{ section.settings.about-image-main-2 | img_url: 'master' }}');
min-height: 400px;
height: 100%;
}
{% endif %}
}
@media screen and (max-width: 820px) {
{% if section.settings.about-image-main-mobile %}
.collection-banner-container {
background-image: url('{{ section.settings.about-image-main-mobile | img_url: 'master' }}');
min-height: 750px;
height: 100%;
background-position: bottom;
}
{% endif %}
}
{%- endstyle -%}
<div class="collection-banner-container">
</div>
{% schema %}
{
"name": "Collection Banner",
"settings": [
{
"type": "image_picker",
"label": "Collection Banner Background Image Desktop",
"id": "about-image-main-2"
}, {
"type": "image_picker",
"label": "Collection Banner Background Image Mobile",
"id": "about-image-main-mobile"
}
]
}
{% endschema %}
If you need further assistance, please let me know. If you found my help useful, consider liking this message and marking it as the solution.
Thank you
K.K
This is an accepted solution.
@Jason10 , Dynamic options allow you to change your image using theme options, similar to the image.
This is an accepted solution.
Hi @Jason10,
Firstly, please provide a screenshot and the page URL showing where you want to display different images for mobile and desktop. This will help me to provide you with the appropriate code and file name and assist you better.
Thank you
K.K
This is an accepted solution.
got it @Jason10 can you please send this banner file code also
thanks
K.K
This is an accepted solution.
hey @Jason10 is it possible to add me as a staff on kaushik@huptechweb.com this mail i'll add the code and then provide a small video on how to add images using theme options
This is an accepted solution.
@Jason10 if you don't know how to add staff members please follow this Steps:
This is an accepted solution.
I'll send the collaborator request please check and accept
This is an accepted solution.
Hey @Jason10, the changes have been made from my end. I will send a Google Meet invitation to explain how to add the second image and all the other details. Please check your store email.
Hello @Jason10 I have checked your issue
can you please use mobile view and desktop view 2 different images
please check this
if any other help, please connect with us
Thanks for the reply. No I can only upload 1 picture for the image banner, so the picture on both desktop and mobile view are the same picture.
@Jason10Can you please share your store URL?
Ulnar.co
This is an accepted solution.
Hey @Jason10
please try this code with dynamic options
{%- style -%}
@media screen and (min-width: 821px) {
{%if section.settings.about-image-main-mobile %}
.collection-banner-container {
background-image: url('{{ section.settings.about-image-main-2 | img_url: 'master' }}');
min-height: 400px;
height: 100%;
}
{% endif %}
}
@media screen and (max-width: 820px) {
{% if section.settings.about-image-main-mobile %}
.collection-banner-container {
background-image: url('{{ section.settings.about-image-main-mobile | img_url: 'master' }}');
min-height: 750px;
height: 100%;
background-position: bottom;
}
{% endif %}
}
{%- endstyle -%}
<div class="collection-banner-container">
</div>
{% schema %}
{
"name": "Collection Banner",
"settings": [
{
"type": "image_picker",
"label": "Collection Banner Background Image Desktop",
"id": "about-image-main-2"
}, {
"type": "image_picker",
"label": "Collection Banner Background Image Mobile",
"id": "about-image-main-mobile"
}
]
}
{% endschema %}
If you need further assistance, please let me know. If you found my help useful, consider liking this message and marking it as the solution.
Thank you
K.K
Thanks for the help! I’m sorry may I ask what is dynamic options? I’m not sure where should I paste the code to🙏
This is an accepted solution.
@Jason10 , Dynamic options allow you to change your image using theme options, similar to the image.
Sorry I'm confused. Where should I paste the code to? And i don't have the "collection banner" template available in my "Trade" shopify theme, that's how it looks like on my end:
Thanks!
This is an accepted solution.
Hi @Jason10,
Firstly, please provide a screenshot and the page URL showing where you want to display different images for mobile and desktop. This will help me to provide you with the appropriate code and file name and assist you better.
Thank you
K.K
This is an accepted solution.
got it @Jason10 can you please send this banner file code also
thanks
K.K
Sure, where can I find the banner file code? Thanks
This is an accepted solution.
hey @Jason10 is it possible to add me as a staff on kaushik@huptechweb.com this mail i'll add the code and then provide a small video on how to add images using theme options
Sorry my Basic Shopify plan doesn’t come with a staff account function🙏
This is an accepted solution.
@Jason10 if you don't know how to add staff members please follow this Steps:
That’s what I see on my end:
And if you’re referring to the collaborator function, my collaborator request code is 1762.
This is an accepted solution.
I'll send the collaborator request please check and accept
Request accepted. Thank you!
This is an accepted solution.
Hey @Jason10, the changes have been made from my end. I will send a Google Meet invitation to explain how to add the second image and all the other details. Please check your store email.
Problem solved! Thank you so much for the help! 🙌
Hello,
Could you please clarify what dynamic code is? I'd like to do the same thing as the OP to my own website (same image but different sizes to accommodate the desktop vs mobile issue).
Thank you,
Lauren
hello,
experiencing the same issue. the banner for web is showing for both desktop and web, could you please help?