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

lightBox/sliding menu/cart functionality

AbdouAI•350
@AbdouAI
A solution to the E-commerce product page challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Hello! I couldn't figure out how to make a div's height the same as the page (not the screen or viewport) so when the sliding menu comes out, the dark background ,if the window's height is small, doesn't cover the entire site. any help will be appreciated,Thanks!

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Adriano•330
    @adriano-wb
    Posted over 2 years ago

    Este código HTML já está bem organizado e com a estrutura básica necessária. No entanto, aqui estão algumas sugestões para melhorá-lo:

    • Use aspas duplas para todos os atributos HTML em vez de aspas simples para manter uma consistência. Por exemplo: href="index.html" em vez de href='index.html'.

    • Adicione uma descrição ao seu ícone do menu para torná-lo mais acessível. Por exemplo: <img src="images/icon-menu.svg" alt="Menu icon">.

    • Adicione um label ao seu ícone do carrinho para torná-lo mais acessível e também adicione um title que descreva o que o ícone faz quando clicado. Por exemplo:

    <button id="basket" aria-label="Shopping cart">
      <div class="cart-notif no-visible" id="cartNotif">0</div>
      <svg width="22" height="20" xmlns="http://www.w3.org/2000/svg" title="View shopping cart"><path d="M20.925 3.641H3.863L3.61.816A.896.896 0 0 0 2.717 0H.897a.896.896 0 1 0 0 1.792h1l1.031 11.483c.073.828.52 1.726 1.291 2.336C2.83 17.385 4.099 20 6.359 20c1.875 0 3.197-1.87 2.554-3.642h4.905c-.642 1.77.677 3.642 2.555 3.642a2.72 2.72 0 0 0 2.717-2.717 2.72 2.72 0 0 0-2.717-2.717H6.365c-.681 0-1.274-.41-1.53-1.009l14.321-.842a.896.896 0 0 0 .817-.677l1.821-7.283a.897.897 0 0 0-.87-1.114ZM6.358 18.208a.926.926 0 0 1 0-1.85.926.926 0 0 1 0 1.85Zm10.015 0a.926.926 0 0 1 0-1.85.926.926 0 0 1 0 1.85Zm2.021-7.243-13.8.81-.57-6.341h15.753l-1.383 5.53Z" fill="#69707D" fill-rule="nonzero"/></svg> 
    </button>
    
    • Adicione um atributo alt à sua imagem de avatar para torná-la mais acessível. Por exemplo: <img src="images/image-avatar.png" alt="User avatar">.

    • Certifique-se de adicionar um texto alternativo significativo para todas as imagens, para tornar o seu site mais acessível e amigável aos mecanismos de busca.

    • Adicione comentários ao seu código para explicar o que cada seção faz. Por exemplo: ou. Comentários úteis

    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