hr {
display: block;
margin-top: 0.5em;
margin-bottom: 0.5em;
margin-left: auto;
margin-right: auto;
border-style: inset;
border-width: 1px;
}
What you're describing is know as a 'Horizontal Rule'.
Your page needs to contain the <hr> tag
You'l also need to add css styling for it to you theme. The page I linked provides this code:
You can also add a width variable to the css to get the desired effect.Code:hr { display: block; margin-top: 0.5em; margin-bottom: 0.5em; margin-left: auto; margin-right: auto; border-style: inset; border-width: 1px; }
margin-left: auto;
margin-right: auto;
width: 10%;
Divi calls it the 'Divider Module', these sort of options should be available in the 'General Settings' for that particular module. You will need to set some custom CSS to control the width though, as well as setting centre alignment for the rule.
You can do this by pasting this code in the 'Main Element' field in the 'Custom CSS' tab
Code:margin-left: auto; margin-right: auto; width: 10%;
Personally, I'd avoid doing this with hr elements, as it means having to add another html element whenever you're replicating the style. Which is just a bit of a faff.
Do it with a :before or :after pseudo element and you'll be able to create this same effect by just adding a class or by including the element itself.
A pseudo element is an element that's not actually in the DOM and is usually used for small decorative things like what you're trying to achieve.sorry that's gone right over my head, not that familiar with code.
A pseudo element is an element that's not actually in the DOM and is usually used for small decorative things like what you're trying to achieve.
I made a jsbin, so you can see how they work.
https://jsbin.com/nizugehube/edit?html,css,output
You can read up on pseudo elements on MDN: https://developer.mozilla.org/en/docs/Web/CSS/Pseudo-elements