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

Css , Flexbox , media query

@abdellahelaajjouri

Desktop design screenshot for the Stats preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Hi Guys, What is the best practice to make your website responsive ? I think that media query is not very practical for me . Let me know please! Thank you all .

Community feedback

P
Jessica 880

@perezjprz19

Posted

Hi! @abdellahelaajjouri

I didn't looked at your code and saw that you added two media queries.

I started mine mobile first, as you did. However, I only used one media query.

My process:

I start the simulation for a very small device, such as the galaxy fold.

I add all my HTML with semantic tags only adding and only adding divs where needed for styling.

In the CSS I start working from the inside out, so fonts and colors and then container. I used flex or grid depending on the project to place items within the container.

I remind myself the browser already has some responsiveness built in.

I try to avoid using fixed widths as much as possible and don't usually add a height. I use min() and max().

In responsive mode, I slowly increase my window size adjusting the values for min() max() as I go where needed.

Then if things start to break I use a media query.

I remind myself that with the challenges, we don't know how it should look at every size, so long as it still looks nice In the sizes in between, I don't worry too much.

I don't know how to avoid media queries entirely, and sometimes go media query crazy as I try to patch things up 🤣 but I think my process is helpful most of the time.

Marked as helpful

0

@abdellahelaajjouri

Posted

Hi @perezjprz19, I realy appreciate you putting so much of your valuable time to helpe me. This feedback is going to Improve my process so as my code . Thank you so much .

0
Naveen Gumaste 10,480

@NaveenGumaste

Posted

Hay ! Good Job Abdellah

These below mentioned tricks will help you remove any Accessibility Issues

-> Add Main tag after body like it should be your container. For 1st heading or h1 tag, use header tag and then inside the header put your h1 or h2 etc . But use header tag only once in main heading element.

Keep up the good work!

Marked as helpful

0

@abdellahelaajjouri

Posted

Hay ! @Crazimonk

I will do that ASP

Thank You So much!

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