Is there a CSS way to put a horizontal line across a div container?

I know I can do it with the html <hr> tag but people tell me you should leave the styling for css and not html.

you can try div::after pseudo element to create an empty element, absolute position it and then give it a height and width to make it look like an hr tag.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.