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

Responsive E-Learning Landing Page using Generic HTML/CSS, BEM Naming

accessibility, bem
Dan•300
@dtp27
A solution to the Skilled e-learning landing page challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


I would love people to take a hard look at my code and give me as much feedback as possible. :) This one gave me some trouble, and I tried a few things for the first time. Particular items I would especially love feedback on are:

  1. My usage of the BEM naming system
  2. My attempt at making my HTML more accessible
  3. How I can improve the responsiveness and overall style of the hero images. I initially used HTML image elements but switched to background images in CSS since I couldn't get the HTML elements version to work.
  4. The overall responsiveness of the page. I used the Chrome developer tools to design it using mobile, tablet and desktop views, but it looks awkward when resizing the page between those points. Also, I don't like how the hero image is also re-sizing within the div; I feel like it should be one size, then at the breakpoint change to the next hero image.
  5. I never got the shading on the gradient to work properly.
  6. The way I used CSS variables for colors and font styling. This is the first time I actually used Figma so I used the actual pixel sizes instead of having a base size and using rems to size different elements.

Any and all feedback is welcome, including for anything I didn't mention. Thanks!

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • David•7,960
    @DavidMorgade
    Posted almost 3 years ago

    Hello Dan, congrats on getting this solution, the layouts looks pretty and the responsiveness is great!

    I will try to help you answering your questions the best I can.

    1. Seems good for me, but you should try to take more advantage when getting on a new block, for example, if you define a courses class then all their childs should not care about the main class they should start like courses__description courses__heading etc... good job on the naming of your buttons to get those juicy styles!

    2. Great work defining articles on each card, I would personally divide the main in two sections because they are really semantically related, instead of divs, one is the hero and the other is the grid of skills.

    3. Using properties like object-fit: cover or object-fit: contain and getting your image on a container with display: block and 100% width can save you a lot of work, give it a try on your next challenge!

    4. Don't bash yourself with this, the responsiveness is totally fine and the project looks great even on a 4k monitor.

    5. You can use some cool gradient generator like css-gradient, maybe this helps you with your gradients.

    6. Avoid pixels for sizes, because this can be buggy on high density and low width screens, stick to rems, if you want to use rems as you were using pixels, you can convert your root font-size to 62,5% so 1 rem equals 10px, and then on the body re-assign the font-size to 16px to avoid unnecesary behaviours.

    Snnipet to get 1 rem = 10px for easy Figma conversion to CSS without using pixels:

    html {
      /* 1rem = 10px */
      font-size: 62.5%;
    }
    body {
      font-size: 1.6rem;
    }
    

    Hope my answers did help you, if you have any questions, don't hesitate to ask!

    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