2 Replies
You can put the whole section (let's call it
hero
) in a grid container:
This will work for desktop; then you can rewrite it for mobile like:
You really don't need any special styles for mobile; maybe a min-height on the hero section itself but it depends if this is the only content / if you're using an image rather than a background-image etcif you want to swap the image, use <picture> with multiple <source> and an <img>
on the <img>, you can put the src of the mobile image, and then add a <source> with a media attribute