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

3 Card working with rounded corners changing

bootstrap
Cameron Dick•20
@CTDck
A solution to the 3-column preview card component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Thank you for the assistance everyone! I believe this one is solved. Once I was made aware of media queries I was able to solve the issue of the rounded corners appearing and disappearing. Any further tips on styling and general code etiquette is much appreciated! Just so I can formally get my head around media queries but as I understand it:

@media (max-width: 600px) {
              /*Insert CSS style that changes*/
}

Would mean once the page dips below 600px the styling inside takes effect?

Cheers all!

Code
Couldn’t fetch repository

Please log in to post a comment

Log in with GitHub

Community feedback

  • P
    Marge C.•440
    @msunji
    Posted about 3 years ago

    Heya! Great job finishing this project 👍

    Reading documentation isn't always the easiest, and I totally get that. But I think you're already moving in the right direction by putting what you've read into practice with this project. I guess all I can say is that it'll take a bit of time, a bit of patience, and sometimes a lot of looking things up on Google and Stack Overflow 😅 Don't worry about it too much if you don't get it the first time around.

    Now about the corners. It seems like Bootstrap's Card component comes with rounded corners out of the box. You'll want to change it up a bit with the rounded-0 utility class to remove all the rounded corners. Then, in styles.css, you're going to need to do some custom code and media queries to set the rounded corners depending on their location (and screen size). You'll end up with something like this, for instance:

    .sedan {
      border-radius: 12px 12px 0 0;
    }
    
    @media (min-width: 600px) {
      .sedan {
        border-radius: 12px 0 0 12px;
      }
    }
    

    I'm not super well versed in Bootstrap, so there might be other solutions out there, but I hope this helped regardless!

    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 1st-party linked stylesheets, and styles within <style> tags.

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.

Oops! 😬

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

Log in with GitHub