The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › Centering text horizontally between 2 hr lines
Hi
I have the following code:
Request Quotation
My css:
hr { display: block; height: 1px; border: 0; border-top: .5px solid #e10707; margin: .5em 0; padding: 0; }
There is a big white space gap between the text and the bottom hr tag.
What can I do to fix this issue?
We’d need a demo, ideally in Codepen.io of the actual issue.
There could be a variety of reasons for this. It’s more likely to be related to the margins of the text elemment than the hr.
hr
Personally, I wouldn’t be using an hr here…seems to me that borders on your text element would be fine.