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

Sunny-side-agency-landingpage_CSS-only.

P
Harm Intemann•590
@ghintema
A solution to the Agency landing page challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


I used input-checkboxes and labels to realize a touchable slide-menu. Thus no JS. I also implemented some utitlity-classes for the design-system (font-properties and colors).

Please feel free to review my code and help me optimize...

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Elaine•11,360
    @elaineleung
    Posted almost 3 years ago

    Hi Harm, I think you did a good job putting this together, and it's good to see that you got the testimonials sections fixed 🙂

    You do have some other things to fix, and here are my suggestions:

    1. Using a fixed width and max-width on the body selector is something I don't recommend doing because once you're past the max-width, there's only white space that surrounds the sides. I would remove all the width and max-width properties on the body, and I'd also change your breakpoint to min-width:940px. If you need to keep contents from growing past a certain width, you can put a container within the sections that you need that for.

    2. The yellow image seems to be growing past the left text box when it goes to a certain size; try adding a object-fit: cover and height: 100% to make it more contained. You'd also want to make sure that photos that would be cropped within the container all have a object-fit: cover.

    3. Lastly, you got some pretty big padding values! I advise not using huge padding like this because in smaller screens, the padding would make the things inside really squished. Instead, try putting everything in a container and then give it a responsive width. For example, in your card-4, I would create a new div inside and put all the text in the new div, and then I'd use width: min() to make sure there's enough space and that it doesn't grow past a certain width:

      HTML: 
      
      <div class="card" id="card-4">
         <div class="card-container">      
             <h2>Stand out to the right audience</h2>
             <p>Using a collaborative formula of designers, researchers, photographers, videographers, and copywriters, we’ll build and extend your brand in digital places. </p>
              <a href="#">learn more</a>
          </div>
      </div>
      
      CSS:
      
      .card {
          display: grid;
          place-content: center;
          padding: 2rem;
      }
      .card-container {
          width: min(80%, 30rem);  // You can experiment with the values here
          margin-inline: auto;
      }
      

    Hope this can help you out, and once again, well done!

    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