Assessment needed for CSS background and border test

I would really appreciate if someone could kindly assess my work about CSS background and border.

The result looks like very similar to the example, but I’m not sure if I did this correctly :thinking:
I put the star images as the background of h2, but is this the right way?

I originally put the image as the background of .body, but that made the stars on the right side kept repeating from the top border to the bottom border.
To have only 3 stars on the right (just like the example), I couldn’t think of any other way but making the image h2’s background…

My questions are:

  • Can I possibly control how many times background images repeat?
  • Is there any way to limit the space background images can be put, in this case, without adding new HTML elements?

Thank you for your help! :blush:

my work:
HTML and first half of CSS styles were given as the starting point, and I only wrote the last .box { } and h2 { } rulesets.

original assessment page:

Hi @Risa

Yes, it is.

As far as I know you can’t limit the amount of repeats other than by setting the size of the element like you did in this exercise.

Everything in your code looks good. :+1:
Keep up the great work!

Michael

1 Like

Hi Michael :wave:

Thank you so much!
I’m glad to know how I did was the correct solution :slight_smile:

1 Like

You can try with Pseudo Elements, when you complete this chapter, below is url so you can check it how it is work.

1 Like

Thank you so much for your suggestion!

Since I hadn’t learnt positioning yet it was a little bit difficult to understand at the beginning, but I think I got it (at least as much as I can at the moment)! :smile:

It was a really nice opportunity to stretch myself a little. Thank you! :blush: