Sam King
@samhlkingAll solutions
- Submitted 6 months ago
INTERACTIVE RATING COMPONENT w/ JS
- HTML
- CSS
- JS
As my first JavaScript project, I'd love any feedback on my script. Is there a more efficient/better way to do what this project requires?
Also, I made the form 'required' with an if statement within the function
if (radios !== null) { formStart.style.display = "none"; formFinish.style.display = "block"; selectedMessage.innerText = `You selected ${radios} out of 5` }
As the button on the form isn't a submit button, I believe the normal method of adding 'required' to the HTML inputs wouldn't work. Is my workaround ok or once again is there a better way?
- Submitted 6 months ago
Social proof section using HTML/CSS
- HTML
- CSS
I'd appreciate feedback on my
@media
rules, as although everything is working as it should across screen widths, I think the code could be simplified.Also, for the staggering of the 5 star review boxes, I just added
nth-of-type
rules with margin and negative margin on either side. I assume this should instead be done with aposition
rule or something like that instead. The code looks like:nth-of-type(2) { margin-right: 40px; margin-left: -40px }
Similarly for the bottom 3 testimonial boxes.
Any other feedback is welcome.