Responsive design Intereactive Rating component using flexbox

Solution retrospective
i found it difficult to make a span element behave like a word with equal spacing from right and left in a paragraph.
is there a simplere or easier way to do it other than specifing margin for the span?
any feed back is appreaciated.
Please log in to post a comment
Log in with GitHubCommunity feedback
- P@markuslewin
It sounds like you want the default behavior for inline content, which means you can remove
display: flex
from.bubble
, and themargin
from#scored
Marked as helpful - @cprincec
Hi,
The difficulty you have in adding a single whitespace on the left and right side of the dynamic rating number is due to the 'flex' display you set to the parent 'section' element (with class of bubble). Take that (flex) out then single whitespaces will work properly around the number.
Join 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