Need help -> Borders and Backgrounds skill test

I’ve been trying to center my h2 with the background-image

I was trying to use:

h1::before {
background-image: url(star.png);

h1::after {
background-image: url(star.png);

But this doesn’t work.

Do I need to use a special display property?

Hello @salvadorperezm

for h1::before and h1::after it mean it will add what inside the selector before or after the h1 and even to see that work you would need to add content even it just simple space

could you share your full code and link to the task

and have a nice day :slight_smile:


Sure, here’s my code and here’s the task. :smiley:

use text-align:center; aand it will center it and check this for extra details about what text-align can do

hope that help and have a nice day :slight_smile:


It did! Thank you :smiley:

1 Like

you welcome :slight_smile: