Design comparison
Solution retrospective
How to remove the space at the top on the mobile display screens when in media query?
Community feedback
- @BlackpachamamePosted 10 months ago
Greetings! you have done a great job š
š Some accessibility and semantics recommendations for your HTML
- To improve the semantics of your HTML, you can change your
<div class="main_div">
to a<main class="main_div">
- You can use the
<picture>
tag to change the image according to the screen size. More info - To eliminate space on mobile screens, you should remove the
margin-block
property for those screen sizes. For this you can use media queries - Your
body
background color should behsl(30, 38%, 92%)
- Do not use
%
forwidth
orheight
. Better userem
,em
orpx
- Use
min-height
andmax-width
, this will help the content stretch or shrink if you need to. Unlikeheight
andwidth
which can cause your content to be cut off on certain screens
Marked as helpful1@GeokobbyPosted 10 months ago@Blackpachamame thank you a lot, I will look in the source code and do the various edit.. I appreciate š
1@GeokobbyPosted 10 months ago@Blackpachamame this challenge for the image placement has two different images for the desktop screen and the mobile (various) device screens that's why I used the empty tag <div class="image__replacement"></div> so I could change the images with css property "background-image: url()" in and out of various screen with media query too.
The link you sent with the picture tag seem a little bit confusing to apply with this challenge if you can brief me on it more
0 - To improve the semantics of your HTML, you can change your
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