Section (Carousel) Background Colour Dawn Theme

Topic summary

A user created a custom product-slider.liquid file for their Shopify Dawn theme and wanted to apply a background color (#3F3F3F) to the entire carousel section, including the title area. However, the background color wasn’t extending to cover the title portion.

Solution Provided:
A PageFly support representative offered CSS code to be added to the base.css file:

  • Navigate to Online Store → Theme → Edit code
  • Locate base.css file
  • Add the provided CSS targeting the specific section template ID

Resolution:
The user successfully implemented the fix by inspecting the element to find their specific template ID, replacing it in the CSS code. The solution worked as intended.

Note: The original post included code snippets showing the Liquid template structure with Flickity carousel settings and schema configuration for product selection and navigation customization.

Summarized with AI on November 24. AI used: claude-sonnet-4-5-20250929.

https://b3tqgwmtqccnef8v-68796285242.shopifypreview.com

Hello, I am have created a custom product-slider.liquid

Show More

{{ section.settings.title | escape }}

{% for block in section.blocks %}
{% assign product = all_products[block.settings.product_item] %}

{{ product.title }}

{{ product.price | money }}

{% endfor %}

{% assign nav_range = section.settings.navigation_amount %}
{% style %}
@media only screen and ( min-width: 1201px ) {
{% if nav_range == 2 %}
.dawn-product-slider .carousel-cell {
width: calc(49% - 10px);
}
{% elsif nav_range == 3 %}
.dawn-product-slider .carousel-cell {
width: calc(32% - 10px);
}
{% elsif nav_range == 4 %}
.dawn-product-slider .carousel-cell {
width: calc(24% - 10px);
}
{% endif %}
}
.flickity-page-dots .dot {
background: {{ section.settings.navigation_color }};
}
.flickity-button-icon {
color: {{ section.settings.navigation_color }};
}
{% endstyle %}

{% schema %}
{
“name”: “Products slider”,
“settings”: [
{
“type”: “range”,
“id”: “navigation_amount”,
“min”: 2,
“max”: 4,
“step”: 1,
“default”: 3,
“label”: “Change the number of cards in view”
},
{
“type”: “color”,
“id”: “navigation_color”,
“label”: “Change color of the pagination|navigation|scrollbar”
},
{
“type”: “text”,
“id”: “title”,
“default”: “Products slider”,
“label”: “t:sections.featured-collection.settings.title.label”
}
] ,
“blocks”: [
{
“type”: “card”,
“name”: “Product card”,
“settings”: [
{
“type”: “product”,
“id”: “product_item”,
“label”: “Choose the product you want to displayed”
}
]
}
] ,
“presets”: [
{
“name”: “Product slider”,
“category”:“Custom”
}
]
}
{% endschema %}

However, the background colour does not come up (cover) the tile. I want it to INCLUDE the title. See image:

I want the background colour (#F3F3F3) of the slider to apply to the whole of that section not just behind the carousel.

Thanks in advance! Best

Hi @Andy106

This is Victor from PageFly - Landing Page Builder App

You can try this code by following these steps:

Step 1: Go to Online Store->Theme->Edit code.

Step 2: Search file base.css.

Step 3: Paste the below code at bottom of the file → Save

div#shopify-section-template–17193332932922__a37a0a5e-d214-475d-b185-6b5292674cbc {

background: #F3F3F3 !important;

}

Hope that my solution works for you.

Best regards,

Victor | PageFly

1 Like

Excellent thank you!

I am using a duplicated dawn theme, but I just inspected element and changed the template ID and works great! Thanks again!

1 Like

You are welcome @Andy106 :blush: