task goal:
Make sure that the heading text does not overlay the image, and that it is centered — you will need to use techniques learned in previous lessons to achieve this.
https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Test_your_skills_backgrounds_and_borders
my answer:
CSS:
.box {
border:5px lightblue solid;
border-top-left-radius: 20px;
border-bottom-right-radius: 20px;
padding: 10px 20px;
}
h2 {
background-image: url(star.png),url(star.png);
background-position: left, right;
background-repeat: no-repeat, repeat-y;
text-align:center;
padding: 5px 20px;
}
HTML:
<div class="box">
<h2>Backgrounds & Borders</h2>
</div>
my text is always overlapping with the star. and i don’t know how to solve it.