Separators
-
Hi,
I’m using a separator to separate two sections on a page but the line is quite thick. There doesn’t seem to be any way to change the line thickness? I’m working in the Twenty Twenty Three theme.
Many thanks.
-
Hi @editorialteam you can change the width of the line using CSS code, you can adjust 1px to 2px or any other number you would prefer. You can access the CSS editor by adding this after your URL
/wp-admin/customize.phpand visiting the Additional CSS panel..wp-block-separator {
border: 3px solid;
}Hi @thelmachido,
Thank you for the heads-up. It doesn’t seem possible though to reduce the line thickness to below 1px. I was hoping to get a very thin line.
Hi @editorialteam – 1px is the lowest possible pixel value when creating a CSS border. That’s because digital screens can either display a pixel, or no pixel, but not a partial pixel.
More about border values: https://developer.mozilla.org/en-US/docs/Web/CSS/border-width
That said, you could try using a different unit like
eminstead ofpxto try creating the illusion of a thinner line. So something like:.wp-block-separator { border-width: 0.01em; }Let me know how it goes!
-
This reply was modified 3 years, 3 months ago by
Kathryn Presner. Reason: fixed typo
Hi Kathryn,
Thanks for the suggestion. Is the syntax “border-width” or “border” for the thickness (not width) of the separator line?
Many thanks.
Is the syntax “border-width” or “border” for the thickness (not width) of the separator line?
Hi @editorialteam – you should be able use either.
borderis the shorthand property, which allows you to add optional properties likecolororstyleto the CSS declaration.p.s.
widthis the same as “thickness” in thebordercontext. (It does not refer to the length of the border.)Thank you for letting me know. Unfortunately, thicknesses below 1px don’t seem to work nor do low values in em.
Thank you for letting me know. Unfortunately, thicknesses below 1px don’t seem to work nor do low values in em.
On a test site I can see the difference between using 1px and 0.01em how thin do you want the line to be?
This is the default thickness for the separator 👆🏽 This is a thinner line after adding 0.01em on the CSS code 👆🏽 -
This reply was modified 3 years, 3 months ago by
thelmachido a11n.
-
This reply was modified 3 years, 3 months ago by
thelmachido a11n.
Hi,
Thanks for the advice. As you say, the screenshots clearly show the differences in line thicknesses but this still doesn’t seem to work for me. I’ll have a closer look in due course.
Many thanks again.
@editorialteam I’d be glad to take a look at this directly to try to see why it doesn’t seem to be working for you. Feel free to provide a link to the page or post on your site. Thanks!
That’s kind of you but I’m working on a staging site at the moment which is not public facing. Presumably the CSS code (copy and paste) is inserted in the ‘Additional CSS’ panel in ‘Customising’? If so, that’s what I have been doing. I’ll have another look in the next day or so. Thank you anyway.
Presumably the CSS code (copy and paste) is inserted in the ‘Additional CSS’ panel in ‘Customising’?
Yes, that’s exactly where it goes.
I’ve seen code glitches before (extra unintended characters when copy-pasting, accidentally nested code, dropped curly brackets, etc.) that prevent CSS from rendering correctly, so those are the types of things I was going to look for. You’re also welcome to paste the entire contents of your CSS editor (that Additional CSS panel) here in a Code block so I can have a look and do some testing.
Thank you. This is the code:
.wp-block-separator { border-width: 0.01em; }Thanks – that looks fine.
What browser and version are you using?
What operating system?Using Google Chrome (111.0.5563.64 (Official Build) (64-bit)) and Windows 10 22H2. I’ll try another browser in the meantime. Many thanks.
-
This reply was modified 3 years, 3 months ago by
The topic ‘Separators’ is closed to new replies.


