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

Blogr landing page using ONLY HTML, CSS ,and Vanilla JS

Mohsin Miyaji•440
@mohsin316
A solution to the Blogr landing page challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Really enjoyed making this landing page! my questions are:-

  • is there a better way to add transition or animations to the nav dropdowns? i tried using opacity 0 or transform: scale(0,1) but it doesn't hide the content completely like display: none does. and its not possible to animate when display is none. is there a better way?

  • is there a good source online that teaches how to use gradients better? i need to learn better ways to use gradients and box shadow as well.

any other feedback is appreciated! :D

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Chamu•13,820
    @ChamuMutezva
    Posted over 3 years ago

    hi.

    • use a button with an image (hamburger) as a child and another button with the close image. Add aria-label to the button as an image will not provide the purpose of the button to assistive tech users and use alt="" on the image as it is just a decorative image.
    • On the last point - they are sections in the design where images have been provided for mobile and another (bigger version) for desktop. One choice to implement them can be to use them as background images. In the event that you use the img element, using display: none to hide eg the desktop image on mobile is not a recommended technique - it wastes bandwidth and considered expensive as all images will be downloaded by the user's device even though the user wont use the other image. Consider then a site where you are having 10 images. Responsive image techniques (srcset , picture element) will allow users on mobile to get only images that has been set to be viewed on mobile , making the page load faster among other things. See the article below for further explanation, responsive images
    Marked as helpful
  • Chamu•13,820
    @ChamuMutezva
    Posted over 3 years ago

    Hi Mohsin.

    • the site is generally scaling well from small devices to desktop. Well done.
    • the structure of the html is not correct in my opinion, they are several adjustments that needs to be made:
    • The following elements are acting as the hamburger and close button
    <div class="ham">
            <img class="lines" src="images/icon-hamburger.svg" alt="">
            <img class="cross" src="images/icon-close.svg" alt="">
      </div>
    

    Where possible use semantic elements, the images above can not replicate a button in functionality. Keyboard and assistive tech users will not be able to use or know that the images are interactive .

    • the immediate child of a ul element should be an li element, it should not be a div ,or any other elements.
    • if you do not intend to use srcset , i would suggest to remove it from your image <img data-arrow-one class="arrow-light" src="images/icon-arrow-light.svg" alt="" srcset="">
    • the li elements should have an anchor as a child in this scenario - they are links to other pages or sections <li class="li">Overview</li>
    • the main element is important , check the link in the report for further explanation. In short that is wher the main content of the site should be.
    • i see you have <div class="desktop"></div> , which you are using to display the image as a background image in desktop view. The equivalent message in mobile is shown as :
    <div class="mobile">
        <img src="images/illustration-laptop-mobile.svg" alt="" srcset="">
      </div>
    

    While the method may work, this method is not recommended - you need to look responsive images techniques , the srcset is one such method and another one will be the picture element.

    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.

Frontend Mentor for Teams

Frontend Mentor for Teams helps companies and schools onboard and train developers through project-based learning. Our industry-standard projects give developers hands-on experience tackling real coding problems, helping them master their craft.

If you work in a company or are a student in a coding school, feel free to share Frontend Mentor for Teams with your manager or instructor, as they may use it to help with your coding education.

Learn more

Oops! 😬

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

Log in with GitHub

Frontend Mentor for Teams

Frontend Mentor for Teams helps companies and schools onboard and train developers through project-based learning. Our industry-standard projects give developers hands-on experience tackling real coding problems, helping them master their craft.

If you work in a company or are a student in a coding school, feel free to share Frontend Mentor for Teams with your manager or instructor, as they may use it to help with your coding education.

Learn more

Oops! 😬

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

Log in with GitHub