XF 2.1 Newbie question on changing logo for mobile display

My first post... hello all. I look forward to learning and contributing here!

My logo looks great on desktop, but is shrunken down and unreadable on mobile.

I researched and learned that I can modify the PAGE_CONTAINER file, specifically the <div class="p-nav-smallLogo"> line to insert an image suitable for mobile display.

1) Are there any guidelines on what this image size should be?

2) I changed the line to read as follows, but nothing has changed when I browse my site on mobile.

<img src="/images/headermobile.jpg"

Can someone please tell me what I'm doing wrong?

Ideally, I would like the image to appear at the very top of the page in mobile display, like here: advrider.com/f/

Thank you :)
 
You can make it so the normal logo block always shows (even in mobile), and the logo is removed from the nav bar in the logo. Add this to your extra.less:
https://xenforo.com/community/threa...aced-in-header-on-mobile.154081/#post-1284122

Hope that helps... let me know if not :)

Thank you, Russ. I added that code to the bottom of extra.less and now my logo is appearing at the very top of the page on both mobile and desktop, which is great.

On mobile, however, it is very small (iPhone XS). Is this because I need to upload a retina image of much larger size or is their a way for me to control the X,Y dimensions? Right now, the image is 632 pixels wide. Thanks.
 
This is what I have and I think you will like it.

CSS:
// ########################### FULL SIZE LOGO ON MOBILE ########################
.p-nav-smallLogo {
    display: none !important;
}
.p-header-logo {
    max-width: none !important;
}
.has-js .p-header {
    display: block;
}
That looks pretty similar to what I need. Here are some basic newbie questions on how to implement this:
1. Our main site logo is wide (it is ,logo and our name etc). However for our mobile site we want to display only the logo.
2. Can I upload a main logo and a mobile site logo - will the above script handle this? Or is there already an option for this?
3. Where should I place the above script?

Many thanks,
Mike
 
This is what I have and I think you will like it.

CSS:
// ########################### FULL SIZE LOGO ON MOBILE ########################
.p-nav-smallLogo {
    display: none !important;
}
.p-header-logo {
    max-width: none !important;
}
.has-js .p-header {
    display: block;
}
Thank you my friend, this worked a peach.
 
Back
Top Bottom