Design comparison
Solution retrospective
In the header tag is the image and h1, and when the layout switches to mobile, the image is in the left column and h1 is in the right column. Although both labels are together using the header tag
What challenges did you encounter, and how did you overcome them?In the desktop layout it is one image, and in the mobile layout it is another, for this I used the tag with the tag, where I used a media attribute, so I could change this image according to the device size.
I also used:
header {
display: contents;
}
Since and are inside the tag, in desktop mode the image must be in the left column and the h1 in the right column, using display: contents removes the box contention, without having to eliminate the html semantics
Community feedback
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