Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 3 years ago

Styled fixed with the flex property

hamidousow•70
@hamidousow
A solution to the Interactive pricing component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


I didn't understand how to change the value when the checkbox is checked, any help will be a pleasure

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Nick•760
    @Nick331102
    Posted over 3 years ago

    If the you look at the JS in my pricing.js file for the photosnap project it would be helpful to you and give an idea about how to toggle the value.

    https://github.com/Nick331102/Photosnap

    Marked as helpful
  • Raymart Pamplona•16,040
    @pikapikamart
    Posted over 3 years ago

    Hey, great work on this one. Desktop layout looks a bit wider on the design but it's fine for now. The two arrows on the slider are missing though. Site is responsive on the other hand and mobile state looks fine.

    Nick already gave feedback on this one, just going to add some suggestions as well:

    • Avoid using height: 100vh on a large container like the body as this makes the element's height capped based on the viewport/screen's height. Instead use min-height: 100vh so that the element will expand if it needs to. Same goes for the .containerSite selector.
    • While changing those height I still see that the layout has not been fixed. Then checking some css, you are still using height with vh units on other elements. Avoid in general vh in height since it might look good on your end but for others it won't. Try to inspect your layout in dev tools at the bottom and you will see the layout squished.
    • On this one, instead of article use form tag since this layout requires user to fiddle with the input which in the end will submit it so it will be great to use form on this one.
    • On your pageviews you are using a for attribute on a p tag which will not work. You can use output for this one so that you could use for attribute on it but make sure it is pointing on the right id of the input . Right now, it is pointing to the progressbar but your input is using:
    <input type="range" name="progressBar" class="styleRange" id="slider" value="2" min="1" max="5">
    

    slider as the id and the progressBar is the name which won't work. Change the for into using slider. But currently, your pageview does not changes value which won't fire the screen-reader announcement for text-changes for the output.

    • Your slider input right now currently lacks associated label to it or an aria-label to which will define the purpose of the input element so make sure to add one on it.
    • Do not remove the outline styling. If you did, always include a visual-indicator on the :focus-visible for those interactive elements like on this one, the input elements. Try using tab keys to navigate them, it will be hard to know since there are no indicators.
    • For the billing selection, since it is a choice , using radio-buttons for those will be really great. A preferred markup on that layout will be something like:
    <fieldset>
      <legend class="sr-only">Select Tip</legend>  # this should using sr-only
      <div>
        <label for="monthly">monthly billing</label>
        <input type="radio" name="billing" value="monthly" id="monthly">
      </div>
      .....
    </fieldset>
    

    My old solution for this one doesn't use that markup but I have this snippet that uses the same markup only it is dark/light mode toggle

    • The start-my-trial-button should have a type="submit" on this one since it will submit the form if it was real.

    Aside from those, great job again on this one.

    Marked as helpful

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
Frontend Mentor logo

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

How does the accessibility report work?

When a solution is submitted, we use axe-core to run an automated audit of your code.

This picks out common accessibility issues like not using semantic HTML and not having proper heading hierarchies, among others.

This automated audit is fairly surface level, so we encourage to you review the project and code in more detail with accessibility best practices in mind.

How does the CSS report work?

When a solution is submitted, we use stylelint to run an automated check on the CSS code.

We've added some of our own linting rules based on recommended best practices. These rules are prefixed with frontend-mentor/ which you'll see at the top of each issue in the report.

The report will audit all CSS, SCSS and Less files in your repository.

How does the HTML validation report work?

When a solution is submitted, we use html-validate to run an automated check on the HTML code.

The report picks out common HTML issues such as not using headings within section elements and incorrect nesting of elements, among others.

Note that the report can pick up “invalid” attributes, which some frameworks automatically add to the HTML. These attributes are crucial for how the frameworks function, although they’re technically not valid HTML. As such, some projects can show up with many HTML validation errors, which are benign and are a necessary part of the framework.

How does the JavaScript validation report work?

When a solution is submitted, we use eslint to run an automated check on the JavaScript code.

The report picks out common JavaScript issues such as not using semicolons and using var instead of let or const, among others.

The report will audit all JS and JSX files in your repository. We currently do not support Typescript or other frontend frameworks.

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub