Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted 5 months ago

Responsive Webpage using flex display and divs

Ikechukwu001•80
@Ikechukwu001
A solution to the Single price grid component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What are you most proud of, and what would you do differently next time?

I initially considered starting with a grid display; however, I learned that it is important to first examine the project thoroughly and then break it down into manageable parts. Ultimately, I utilized a flexbox layout to achieve the desired results.

What challenges did you encounter, and how did you overcome them?

Challenge: Getting the two-column layout (price/features and "Why Us") to work correctly, especially making it responsive.

How to Overcome: "I initially struggled with using floats for the layout, which caused some issues with responsiveness. I switched to Flexbox, which made it much easier to control the alignment and behavior of the columns, especially on smaller screens. I used media queries to ensure the columns stacked vertically when the screen width became too narrow."

Challenge: Centering the "Sign Up" button.

How to Overcome: "Centering the button was trickier than I anticipated. I tried text-align: center but that didn't work because it's an inline element. I realized I needed to make it a block-level element using display: block and then use margin: 0 auto to center it horizontally."

Challenge: Getting the rounded corners and the box shadow on the main container to look right.

How to Overcome: "I used border-radius for the rounded corners, but I noticed some content was overflowing. I fixed this by adding overflow: hidden to the container. The box shadow was straightforward with box-shadow, but I tweaked the values to get the subtle effect I wanted."

Challenge: Styling the price, especially the currency symbol and the "per month" text.

How to Overcome: "I used <span> tags to style the currency symbol and the 'per month' text separately. I adjusted the font-size and vertical-align for the currency symbol to make it look like a superscript. For 'per month,' I used a smaller font size and a lighter color."

Design/User Experience Challenges:

Challenge: Making sure the card was visually appealing and easy to understand at a glance.

How to Overcome: "I experimented with different color combinations and font choices. I paid attention to the hierarchy of information, making the price the most prominent element. I also made sure there was enough white space to avoid a cluttered look."

Challenge: Deciding what information to include in the card and how to present it concisely.

How to Overcome: "I focused on the key selling points and kept the text brief and to the point. I used bullet points for the features to make them easy to scan. I considered what a user would need to know quickly before making a decision."

Challenge: Ensuring the button was clearly a call to action.

How to Overcome: "I used a contrasting color for the button and made sure the text was clear and compelling ('Sign Up'). I also made it large enough to be easily clickable, especially on mobile devices."

What specific areas of your project would you like help with?

Knowing when to use grid and flex display

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

  • Kehinde•290
    @kennsawyerr
    Posted 5 months ago

    Well done Ikechukwu. I think you can centralize the card and your name by putting them into a <div> as children. Make the div to have display:flex, justify-content:center, align-items:center, and maybe play with align-content :center,

    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