Add padding on top of thumbnail photos

Hi Everyone,

Can you please help me to add some space between the thumbnails and the main picture?

I added the code around this section here

         {% if product.media.size > 1 %}
          <div data-product-thumbs class="media__thumb__wrapper">
            {% for media in product.media %}
            
              {% assign is_artwork = false %}
              {% assign image_atl = media.alt | strip_html | escape %}

              {% if image_atl contains 'artwork' %}
              	{% assign is_artwork = true %}
              {% endif %}

              {% unless is_artwork %}
                  <div class="media__thumb" 
                    data-slideshow-thumbnail 
                    data-media-select="{{ media.id }}">
                    <img alt="{{ media.alt | strip_html | escape }}" src="{{ media.preview_image.src | img_url: '200x200', crop: 'center' }}">
                    {%- if media.media_type == 'model' -%}
                      {% render 'icon-media-model' %}
                    {%- elsif media.media_type contains 'video' -%}
                      {% render 'icon-media-video' %}
                    {%- endif -%}
                  </div>
           	  {% else %}
            	<div class="media__thumb"
					style="display: none; visibility: hidden;" 
                    data-slideshow-thumbnail 
                    data-media-select="{{ media.id }}">
                    <img alt="{{ media.alt | strip_html | escape }}" src="{{ media.preview_image.src | img_url: '200x200', crop: 'center' }}">
                    {%- if media.media_type == 'model' -%}
                      {% render 'icon-media-model' %}
                    {%- elsif media.media_type contains 'video' -%}
                      {% render 'icon-media-video' %}
                    {%- endif -%}
                  </div>
              {% endunless %}
              
            {% endfor %}
          </div>
            
          <div class="artwork_media_wrapper">
            <h3 class="artwork_media_header">Artwork Styles</h3>
            <div data-product-thumbs class="media__thumb__wrapper">
              {% for media in product.media %}
                {% assign is_artwork = false %}
                {% assign image_atl = media.alt | strip_html | escape %}

                {% if image_atl contains 'artwork' %}
                	{% assign is_artwork = true %}
                {% endif %}

                {% if is_artwork %}
                  <div class="media__thumb" data-slideshow-thumbnail data-media-select="{{ media.id }}">
                    <img alt="{{ media.alt | strip_html | escape }}" src="{{ media.preview_image.src | img_url: '200x200', crop: 'center' }}">
                  </div>
                {% endif %}

              {% endfor %}
            </div>
          </div>
          
        {%- endif -%} 
      </div>

Hey @Tony1992

Share your Store URL and Password if enabled.

Best Regards,

Moeed

https://yoonek.com.au/products/personalised-engraved-stainless-steel-insulated-water-bottle-laser-cut-custom-logo?variant=41678896201922

Thank you

Hello @Tony1992

You can add code by following these steps

  1. Go to Online Store → Theme → Edit code.

  2. Open your theme.liquid file

  3. Paste the below code before on theme.liquid

.media__thumb { padding-top: 10px; /* Adjust this value as needed */ }

Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution.

THat worked, but it changed the height of my thumbnail also

@Tony1992

Add this

You can add code by following these steps

  1. Go to Online Store → Theme → Edit code.

  2. Open your theme.liquid file

  3. Paste the below code before on theme.liquid

.media__thumb { padding-top: 10px !important; height: auto !important; }

Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution.

Hey @Tony1992

Follow these Steps:

  1. Go to Online Store

  2. Edit Code

  3. Find theme.liquid file

  4. Add the following code in the bottom of the file above tag


RESULT:

If I managed to help you then, don’t forget to Like it and Mark it as Solution!

Best Regards,
Moeed