Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Responsive layout, Grid, Media query

Cassia Moraes‱ 130

@cassiality

Desktop design screenshot for the 3-column preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


All suggestions are welcome!

Community feedback

PhoenixDev22‱ 16,990

@PhoenixDev22

Posted

Hi Cassia Moraes,

Congratulation on completing anther frontend mentor challenge. I have some suggestions regarding your solution:

  • You should use <footer> landmark for the attribution , it should live outside the the <main> as landmarks allow screen reader users to navigate through sections of your website by skipping to content that interests them. Landmarks could be seen as the logical layout of the website's UI, which is divided into e.g. header, navigation, main content, and footer. So the usage makes sense in any case.
  • Page should contain <h1> . The <h1> is most commonly used to mark up a web page title. This challenge is supposed to be one component in a web page. To tackle the accessibility issue in the report , you may use an <h1> visually hidden with class=”sr-only”. You can find it here.
  • In this challenge, the images are much likely to be decorative. For any decorative images, each img tag should have aria-hidden="true" attribute to make all web assistive technologies such as screen reader ignore those images .
  • In this challenge, what would happen when the user click those learn more? In my opinion, clicking those "learn more" would likely trigger navigation not do an action so button elements would not be right. So you should use the <a. For future use , it's a good habit of specifying the type of the button to avoid any unpredictable bugs.
  • It's not recommended to capitalize in html, let css text transform take care of that. Remember screen readers won't be able to Read capitalized text as they will often read them letter by letter thinking they are acronyms.
  • Adding rel="noopener" or rel="noreferrer" totarget="_blank"links. When you link to a page on another site using target=”_blank” attribute, you can expose your site to performance and security issues.
  • Add border-radius and overflow hidden to the main container that wraps the three cards so you don't have to setborder-radiusto individual corners.
  • width: 375px;an explicit width is not a good way to have responsive layout . Consider using max-width to the card in rem.
  • Don’t Repeat Your CSS(DRY) is a good general principle to follow and eliminating duplication of css code should naturally be part of coding journey.
  • Consider using rem for font size , it' not recommended to use px for font size as absolute units don’t scale for example 15px will always be 15px on the same device. Using pixels is a particularly bad practice for font sizing because it can create some accessibility problems for users with vision impairments.
  • Remember a modern css reset on every project that make all browsers display elements the same.

Aside these, your solution looks great. Hopefully this feedback helps.

Marked as helpful

1

Cassia Moraes‱ 130

@cassiality

Posted

@PhoenixDev22

Hello PhoenixDev22. Thanks for the great tips, it's really new information that I didn't know. It's definitely adding a lot of knowledge.

I will redo with the suggested changes!!

0
Adriano‱ 34,000

@AdrianoEscarabote

Posted

Oi CĂĄssia, tudo bem?

SĂł para nĂŁo perder o hĂĄbito vou tentar dar algumas dicas Ășteis para melhorar seu cĂłdigo!! hahahaha

Para que o usuårio saiba que um elemento é clicåvel, não esqueça de adicionar o atributo cursor com o valor pointer:

button {
    cursor: pointer;
}
  • Considere usar rem para o tamanho da fonte. Se os tamanhos de fonte do conteĂșdo da web forem definidos para unidades absolutas, como pixels, o usuĂĄrio nĂŁo poderĂĄ redimensionar o texto ou controlar o tamanho da fonte com base em suas necessidades. Unidades relativas “esticam-se” de acordo com o tamanho da tela e/ou tamanho de fonte preferido do usuĂĄrio e funcionam em uma grande variedade de dispositivos.

se vocĂȘ quiser continuar codificando com px, vocĂȘ pode baixar uma extensĂŁo muito Ăștil no vscode, ela converte px em rem! link -> px para rem

o resto Ă© Ăłtimo!

espero ter ajudado... 👍

Marked as helpful

1

Cassia Moraes‱ 130

@cassiality

Posted

@AdrianoEscarabote Oi Adriano, boa tarde.

Obrigada pelas dicas, refiz o CSS com o button corrigido!!

Sinta-se a vontade pra sempre aparecer por aqui, tem me ajudado muito.

1

Please log in to post a comment

Log in with GitHub
Discord logo

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