Design comparison
SolutionDesign
Solution retrospective
The thing I struggled most in this challenge is getting the ratings exactly centered. When I add a border it's obvious that the numbers are close, but not exactly in the middle. Any best practices/tips on solving this issue would be appreciated!
Community feedback
- @roraima1986Posted about 1 year ago
Hello, I think the problem is because you declared the rating numbers with a span tag.
Span is an inline element. It has no width or height and therefore does not allow centralization.
My recommendation is that you convert them into an ul tag.
<ul class="rating"> <li>1</li> <li>2</li> <li>3</li> <li>4</li> <li>5</li> </ul>
Marked as helpful1
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord