@davidMorekwa
Submitted
While doing the challenge I was unable to implement the effect where the numbers maintain a gray background after being clicked. I don't know if my problem is clear but if you understood it please help. Thanks in advance.
@Passenger89
@davidMorekwa
Submitted
While doing the challenge I was unable to implement the effect where the numbers maintain a gray background after being clicked. I don't know if my problem is clear but if you understood it please help. Thanks in advance.
Hi Dave!
You are doing well so far. One possible solution that I implemented in order to change the background color of the selected option was to first implement them as a set of radio buttons.
I then added the property appearance: none
to the radio inputs themselves in order to hide the default styles. I selected the label
of the adjacent selected radio button with the pseudo selector :checked
like so .radio-input:checked + label
and altered the background of the label itelf. Now whichever radio input is checked will have the background color you set.
@rohits673
Submitted
My first solution ever on this site! Any feedback is appreciated! Thanks!
edit: Just a minor point i'd like to make. I noticed that you have used <a> tags for your buttons. If you wish to improve accessibility then you could check out this link:
https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/button_role
After clicking the link, check out the section under "Accessibility concerns" and "Best practices".