best way to achieve this in css

what's the best way to achieve this, please? i have tried: .learn-more::after { height: 3em; width: 5em; background-color: var(--yellow); margin-top: 1em; } but it doesn't show up on my page at all even when i inspect it
7 Replies
Coder_Carl
Coder_Carl2y ago
Any pseudo element requires you to specify content So add this to your rule above
content: "";
content: "";
To get that effect you will also need to position it
winniffy
winniffy2y ago
thank you, i added content and it worked. i used display: block and margin to position it
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
winniffy
winniffy2y ago
anywhere i can read up more on this? i don’t quite get it
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
winniffy
winniffy2y ago
aight, preciate your help
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View