Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Interactive Pricing Component Solution

Alex 225

@alexvalpeter

Desktop design screenshot for the Interactive pricing component coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
2junior
View challenge

Design comparison


SolutionDesign

Solution retrospective


Tested this in Chrome, Firefox, and Safari. Any idea why the slider thumb is in a different position in Safari only? Changing the code to fix it in Safari breaks it in other webkit browsers.

Community feedback

@pikapikamart

Posted

Hey, upon loading this, the layout is somewhat odd, shifting to mobile layout there are couple of issues but reaching it, it is good.

Suggestions would be that:

  1. Removing that height: 100% on the body tag will really help keep the layout good. Setting that to 100%, it takes 100% of the remaining height on the viewport, since the body tag have no parent (is html a parent?). That makes the content shifting positions. Removing that will be better and instead add a min-height: 100vh or min-height: 100%.

  2. Adding cursor: pointer on the toggle, just to add some natural feeling since it is an interactive element.

  3. Adding text-align: left on the ul element on the features selector, just to make them properly aligned.

  4. Resizing the browser, your layout doesn't really scale with it. it will be better if you made the mobile layout transition a lot sooner to prevent the viewport overlapping the content. Also that 375px breakpoint is too small, phone nowadays have a higher ppi on that, adjusting to 400 - 410px range will be good. But still keep in mind of making it more sooner, to prevent the viewport.

  5. Your mobile layout seems clamped, adjusting those spacings, to the top and bottom of the elements will be really good.

But still, good work on this one^

0

Alex 225

@alexvalpeter

Posted

@pikamart Hi there! I appreciate you taking the time to review my code, but most of the things you listed are things that I have done on purpose. In these challenges I only focus on the desktop and mobile design, so I am aware that it does not scale. If this were a real job I would do this, but for these I code only for the mobile and desktop dimensions given by the style guide, which are 375px and 1440px respectively. I have also center-aligned the list and placed the cursor: pointer on the switch on purpose. html is parent to body and html is relative to the viewport, so 100% on both is the same as 100vh/vw. Thank you again, but I really would just like to know why the slider thumb looks different in Safari vs Chrome when they are both webkit browsers.

0

Please log in to post a comment

Log in with GitHub
Discord logo

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