Center logo section

Topic summary

A user implemented custom code to display a logo list on their website but encountered an alignment issue: the logos appear centered on desktop but right-aligned on mobile devices.

Technical Details:

  • The code uses CSS Grid with grid-template-columns: repeat(4, 1fr) for layout
  • Includes Liquid templating for a Shopify theme section
  • Features configurable logo width, padding, and image picker settings

Proposed Solution:
Another user provided CSS code to fix the mobile alignment issue, instructing to:

  • Navigate to Online Store → Themes → Edit Code → theme.liquid
  • Insert the provided CSS before the </body> tag
  • A screenshot suggests the fix successfully centers the logos on mobile

Status: The discussion appears resolved with a working solution provided, pending confirmation from the original poster.

Summarized with AI on October 27. AI used: claude-sonnet-4-5-20250929.

I found a custom code to add logo list for my website.

On desktop it looks all ok but on mobile its aligned right but i want it to be centered.

Heres the code:

{{ section.settings.title | escape }}

.logoList--container { padding-top: 20px; padding-bottom: 20px; margin: auto; }

.logoList–container ul {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 1rem;
justify-content: center;
}

.logoList–item{
display: inline-block;
max-width: {{ section.settings.logo_width }};
}

.logoList–item img{
width: 100%;
}

{% schema %}
{
“name”: “Logo list”,
“settings”: [
{
“type”: “text”,
“id”: “title”,
“label”: “Heading”,
“default”: “Logo list”
},
{
“type”: “select”,
“id”: “logo_width”,
“label”: “Logo width”,
“default”: “160px”,
“options”: [
{
“label”: “Extra Small”,
“value”: “50px”
},
{
“label”: “Small”,
“value”: “100px”
},
{
“label”: “Medium”,
“value”: “160px”
},
{
“label”: “Large”,
“value”: “200px”
},
{
“label”: “Extra Large”,
“value”: “400px”
}
]
},
{
“type”: “range”,
“id”: “padding_top”,
“min”: 0,
“max”: 100,
“step”: 2,
“default”: 20,
“label”: “Padding top”
},
{
“type”: “range”,
“id”: “padding_bottom”,
“min”: 0,
“max”: 100,
“step”: 2,
“default”: 20,
“label”: “Padding bottom”
}
],
“blocks”: [
{
“type”: “logo_image”,
“name”: “Logo”,
“settings”: [
{
“type”: “image_picker”,
“id”: “image”,
“label”: “Image”
},
{
“type”: “url”,
“id”: “link”,
“label”: “Link”,
“info”: “Optional”
}
]
}
],
“presets”: [
{
“name”: “Logo list”,
“category”: “Image”,
“blocks”: [
{
“type”: “logo_image”
},
{
“type”: “logo_image”
},
{
“type”: “logo_image”
},
{
“type”: “logo_image”
}
]
}
]
}
{% endschema %}

1 Like

hey @Edgars_Rudzitis share the URLs of your website plz

https://enammo.com/

1 Like

Hello.
Im no expert in coding so would need a ready code haha.


hey @Edgars_Rudzitis dear follow these steps
Go to online store ----> themes ----> go to three Dots ----> edit code ---->find theme.liquid files ----> place the code ---->before the ----->
before the body ----->
if this code work please do not forget to like and mark it solution

1 Like

don’t ware about it just follow the step and then your problem is solved and plz don’t forget to like and mark it solution