Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
I checked out their site on mobile and it looks like they’ve got the same issue, but they’ve designed their image so that the focal point is always in view.
I could deal with that, how can I get to that point? Like I said, on mine there is no header on mobile.
Thanks for your help by the way!
I’m toying with stuff so right now there is a header on mobile, but it’s eclipsed by the menu, which his isn’t.
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
He’s got this CSS too:
.site-header .home-link {
color: #141412;
display: block;
margin: 0 auto;
max-width: 1080px;
min-height: 230px;
padding: 0 20px;
text-decoration: none;
width: 100%;
}
OMG ALMOST THERE… but now it shrinks the image to fit the small screen, unlike his… so I have to figure out how to tell my website to not scale the image down, but also not increase the borders of the page…
Hey also, where did you find that? I looked through his code and CSS but can’t find that specific block on code…
If you check my site on mobile now the header shows up but it distorts it now..
Sorry to keep bugging you, but is there a way to have a different header for mobile? I feel like now that I’ve gotten to this point that might be the easiest solution…?
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Yes you can use media queries just like you did in your first post:
@media (max-width: 360px) {
.site-header {
background-image: url('path-to-new-image');
}
}