I would be happy for the help of community members,
is it possible to add a section divider (line) to the online store 2.0 - dawn theme?
I want to create a section divider for the home page and for the collection pages\ products \ blogs and more..
In fact, is it possible to create a DIVIDER (line) for all the pages?
[website link](https://5he6yremo2do0mco-61834952958.shopifypreview.com/products_preview?preview_key=b079315291048abe4d016d11b74c227a)
@katek
Hello There,
In your Shopify Admin go to online store > themes > actions > edit code
Find Asset >base.css and paste this at the bottom of the file:
.shopify-section{
border-top: 2px solid #bbb;
}
@Galya25
.shopify-section{
border-top: 2px solid black;
}
by this code you can add the border line.
Hi @Galya25 ,
The easiest way possible is to create a section and it is up to you if you want to add a divider line or not.
In your Admin page, go to Online store > Themes
Choose the theme you want to edit then click Actions > Edit code.
Open the Section folder, click Add new section . You can name it whatever you want.
Open the newly created section and paste the code below.
{% schema %}
{
"name": "Section divider",
"settings": [
{
"type": "range",
"id": "padding_top",
"min": 0,
"max": 100,
"step": 1,
"unit": "px",
"label": "Padding top",
"default": 36
},
{
"type": "range",
"id": "padding_bottom",
"min": 0,
"max": 100,
"step": 1,
"unit": "px",
"label": "Padding bottom",
"default": 36
},
{
"type": "range",
"id": "height",
"min": 0,
"max": 100,
"step": 1,
"unit": "px",
"label": "Height of the divider",
"default": 5
},
{
"type": "color",
"id": "color",
"default": "#000",
"label": "Divider color"
},
{
"type": "checkbox",
"id": "full_width",
"default": false,
"label": "Section full-width"
}
],
"presets": [
{
"name": "Section divider"
}
]
}
{% endschema %}
Click SAVE. Now you can add this new section using your Theme editor.
For more information about this section, you can visit the link here .
Nailed it @made4Uo - customizable in every way I can think of, and compatible with my theme (Ride).
Thank you so much!
Hello, thank you for this solution! I would like the line to be 80% of the full width, but when I enter 80 instead of 100 in the width areas, it justifies the line left. Is there a way to keep it in the center? Thank you!
Hi @byClaireWebb
Add this to the <style tag
.sectionDivider span {
margin: auto;
}
Thank you, this worked perfectly!
CPK100
September 20, 2023, 7:06pm
10
Thanks for this info. I’m not a coder at all. Can you tell me where this needs to be added to the style tag? Much appreciated!
STRFTR
June 28, 2024, 2:17am
11
best workaround I’ve found on one of these threads. thank you.
rg1234
August 27, 2024, 6:00pm
12
hello, the px for top and bottom padding is jumping up in 4’s how do i change this to 1 as the line is too thick?
Hey how can i make the divider appear in the product liquid
made4Uo
November 10, 2024, 4:37pm
14
Hi @rg1234 ,
All of the steps are set to 1. I’m not sure what you mean by jumping
made4Uo
November 10, 2024, 4:38pm
15
Hi @Ferismateam
You cannot use this solution inside your product section or product information. It is a section, you simply add a section to any template and find the divider.
I have it look on fidawn.de but i need it in my dawn theme
I just want it like fidawn.de that it says in the place snd not goes to the first place the selected variant
made4Uo
November 10, 2024, 6:06pm
18
This solution works on any theme and any version but style might be affected with default theme style.
how do i make the line thinner? or change colour?
made4Uo
December 16, 2024, 4:53pm
20
You can adjust this using the theme editor. For more information about how to edit the theme using the theme editor, please check the instructions here .