Trillion Posted October 25, 2019 Share Posted October 25, 2019 I'm trying to add a decorative line after all H1 on my Bedford site, but this code isn't working. h1:after { background-color: #e99923; width: 80px; height: 4px; } I can affect all H1 with different code (changing the background color), but using the :after selector doesn't seem to have any effect. Any thoughts? Link to comment
SnazzyView Posted October 25, 2019 Share Posted October 25, 2019 If you want a line after H1 text then you will need something more along the lines of the below CSS. h1:after { content: ""; display: inline-block; border-top: 1px solid black; width: 40px; margin: 0 20px; transform: translateY(-15px); } snazzyview.com Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.