Design comparison
SolutionDesign
Solution retrospective
How can I make mediaquery better? In some screen breaks completely, for example is ok in portrait mode on iphone but landscape is broken... How to fix this screens differences? Thanks in advance!
Community feedback
- @BlackpachamamePosted 11 months ago
Greetings!
- To solve these problems, you can start by using
max-width
andmin-height
instead ofwidth
andheight
, since this way the content is expanded or reduced if necessary. - The problem with the media query is that you defined the measurements wrong, you should assign it to 815px instead of 375px. I also advise that for media queries you do not define it in
px
but inrem
- Your
<div class="attribution">
should be<footer class="attribution">
- You don't need
position
to center the content, you can use the following in yourbody
:
body { background-color: hsl(221, 100%, 96%); font-family: 'Hanken Grotesk', sans-serif; min-height: 100vh; display: flex; justify-content: center; align-items: center; flex-direction: column; gap: 20px; }
- With these changes your
<div class="border">
should be your<main class="border">
and your oldmain
should be deleted since it is of no use
0 - To solve these problems, you can start by using
Please log in to post a comment
Log in with GitHubJoin 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