- This topic has 6 replies, 2 voices, and was last updated 2 years, 6 months ago by David.
-
AuthorPosts
-
October 20, 2021 at 4:40 pm #1970176Andrew
Is there an easy way to make something like this with GB or just using the seperator? Sorry if posted in the wrong form.
If tried just adding a seperator, and using the pseudo after but i can’t get it to display unless I use absolute. The arrow im using is from second link.
Third link is my failed attempt.
Code I’m trying – Please not if I add position: absolute, and left:50% its gets close but I cant get it to touch the line and have the line thicker, any help would be apprecaited!
hr.wp-block-separator{
width:40%;
margin:0 auto;
}hr.wp-block-separator::after{
content:’\25BC’;}
October 20, 2021 at 5:04 pm #1970187DavidStaffCustomer SupportHi there,
try changing your current CSS to:
hr.wp-block-separator { width: 40%; margin: 0 auto; position: relative; } hr.wp-block-separator::after { content: '\25BC'; position: absolute; top: -7px; left: calc(50% - 6px); }
May need to tweak the top position. And the left calc is simply 50% across minus half the width of the unicode character.
October 20, 2021 at 5:30 pm #1970200AndrewThanks David, the content portion was a typo on my end, however I still can’t seem to make it work for the life of me, I added some dummy text and added it to the h2 below it how I normally would with the following code. Could it be a bug with the seperator itself? I’m far from an expert but I’ve done it a few times in the past and don’t remember having this issue.
Below that I added an h3 and centered it, so I’m at a loss why I can’t get it to show for the hr
hr.wp-block-separator {
width: 40%;
margin: 0 auto;
position: relative;
}hr.wp-block-separator::after {
content: ‘\25BC’;
position: absolute;
top: -7px;
left: calc(50% – 6px);
}hr.wp-block-separator {
width: 40%;
margin: 0 auto;
position: relative;
}h2::after {
content: ‘\25BC’;}
h3 {
position: relative;
}h3::after {
content: ‘\25BC’;
position: absolute;
bottom: -37px;
left: 50%;
}October 20, 2021 at 5:31 pm #1970201AndrewI do have Generate Blocks if you know of a easier way Id be happy to try that as well!!
October 21, 2021 at 2:12 am #1970429DavidStaffCustomer SupportOctober 21, 2021 at 4:13 am #1970534AndrewDang cache thought I cleared it sorry!
October 21, 2021 at 4:27 am #1970552DavidStaffCustomer SupportI assume that its working as expected then 🙂
Glad to be of help -
AuthorPosts
- You must be logged in to reply to this topic.