Site logo

Archived topic

Different Header images for mobile devices

41 replies · Started by Guido on February 18, 2016

Viewing posts 16–30 of 42

You can remove the white line with this:

.desktop-image {
    line-height: 0;
}

I'm not seeing the second half of the CSS being added. Can you clear the caching plugin?

Hi Leo,

That fixed the white space, thanks.

I have cleared the caching plugin (multiple times) but no difference?

Hmm weird. Can you try disabling the caching plugin first?

I can't quite tell why the CSS is not getting loaded.

Can you try adding that CSS to the very top of your custom CSS?

I've moved CSS to the top, and also deactivated the cache plugin but still the same result.

Ah, you have this in your media query: max-width: 768x

It should be: max-width: 768px

Great thanks! That fixed it. So simple!

However still an issue with the white space - there is no white space between header and menu on desktop or on vertical mobile, but turn mobile on its side and there is white space? Or just resize desktop and there is no white space until as screen shrinks the white space appears, then as it shrinks further the white space disappears again?

Once again, thanks for the amazing support.

Try this CSS:

@media (max-width: 768px) {
    .inside-header>:not(:last-child) {
        margin-bottom: 0;
    }
}

Thanks Leo that's got it sorted.

Glad we could help!

Hi Leo,

Not sure what you mean? I have different headers to display using CSS and GP Hooks. The hooks code is:

<div class="desktop-image">
    <img src="https://workingsheepdogtraining.com/wp-content/uploads/2018/02/Masterclass-Working-SheepdogTraining-Header-1920x480-b.jpg" alt="Working Sheepdog Training Masterclass videos header image" />
</div>
<div class="mobile-image">
    <img src="https://workingsheepdogtraining.com/wp-content/uploads/2018/02/Masterclass-Working-Sheepdog-Training-Mobile-Header-tall.jpg" alt="Working Sheepdog Training Masterclass videos header image" />
</div>

Regards,
Tully

I copied and pasted the gp hooks code into the last message, however it seems it just displayed the images? How can I copy that code in here for you to see without it just displaying the images? I'll try something else:

Working Sheepdog Training Masterclass videos header image
Working Sheepdog Training Masterclass videos header image
This archived topic is closed to new replies.