MoeTalks Posted March 15 Posted March 15 I cannot get this hr:before tag to be align with the center sothat if a user expands or decreased the width, the box will move with it. Using left: 25% at least shows me that the box can move independently of the hr tag. I've tried <div> but the hr:before just disappears. I've tried flexbox and every other thing i've seen on the web. I would prefer not to have to create an image just to separate page content. Does anyone have any thoughts or even a better way to do this. Photo attached and as always thanks in advance. <style> .sqs-block-horizontalrule hr { background-color: #555; border: none; display: block; height: 4px; overflow: visible; position: relative; width: 100%; } hr:before { background-color: #8EB6DC; content: ''; display: block; height: 8px; width: 20%; left: 25%; position: absolute; top: -2px; z-index: 1; } <hr></style>
paramjeet.kour08 Posted March 16 Posted March 16 site url pls? Hi ! I am Paramjeet kaur Top rated SquareSpace Web Designer and Web Developer with SEO For Web Sites. Working Now As freelancer With lowest Rate. Rate $20 per hour. Till date, I have created over 300 + websites in Squarespace. Contact Me Email
MoeTalks Posted March 16 Author Posted March 16 moecritiques.com pw 2024 go to test page. I've removed all CSS for the time being to test but the code for the above requested is on the test page. Thank you in advance.
Solution MoeTalks Posted March 17 Author Solution Posted March 17 @paramjeet.kour08 This was hours of research and a beast but I finally found the answer. I think I should just quit - YIKES. This was the code I had been searching for. I had to take bits and pieces and tweak it, but I finally got it. Thank you anyway. <style> hr { overflow:initial; &:after { content:''; width:15%; height:10px; display:block; background:#8EB6DC; top:-5px; margin:auto; position:relative; } } } </style>
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment