MyBB Community Forums

Full Version: logo sizing in mobile
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hi everyone, just another what is probably simple problem.
i have changed the logo on the new (my first) forum and it looks fine on desk top but on mobile phone of ipad the logo runs off the side of the page. i dont know what im doing wrong 

the forum is 
 www.locobot.co.uk 

myBB 1.8.22

ive added a pic of how it looks on an ipad 

hope someone can point me in the right direction 
thanks

dont know why pic is not uploading

ive searched everywhere in the community and cant find anything

am i posting in the wrong place or wrong way....if so please advise as i dont wish to offend
Easiest way will be to edit your header template, and add a max width to the logo <img> tag. So find:

<a href="{$mybb->settings['bburl']}/index.php"><img src="{$theme['logo']}" alt="{$mybb->settings['bbname']}" title="{$mybb->settings['bbname']}" /></a>

change to:

<a href="{$mybb->settings['bburl']}/index.php"><img src="{$theme['logo']}" alt="{$mybb->settings['bbname']}" title="{$mybb->settings['bbname']}" style="max-width:100%" /></a>

Or, you can edit the global.css for your theme, and add this:

#logo img {
    max-width:100%;
}
hi, thanks for the help.
with the global.css i cant find any
#logo img

i have

#logo {
background: #fff;
padding: 10px 0;
border-bottom: 1px solid #263c30;
}



and

#logo ul.top_links {
font-weight: bold;
text-align: right;
margin: -10px 5px 0 0;

and

#logo ul.top_links a.search {
background-position: 0 0;
}

and

#logo ul.top_links a.memberlist {
background-position: 0 -20px;

and

#logo ul.top_links a.calendar {
background-position: 0 -40px;
}

#logo ul.top_links a.help {
background-position: 0 -60px;
}

#logo ul.top_links a.portal {
background-position: 0 -180px;
}


that is all there is with logo, no logo img


the first method you mention, (now i will sound dumb) where do i find that to edit?

i really do appreciate the help Matt
You would need to add that CSS, you can just put it at the bottom.

Or, you can edit the header template at ACP > Templates & Style > Templates > expand the template set for your theme > Header Templates > header

Adding the CSS is the cleaner way of doing it, but either will work.
(2022-04-13, 07:02 PM)Matt Wrote: [ -> ]You would need to add that CSS, you can just put it at the bottom.

Or, you can edit the header template at ACP > Templates & Style > Templates > expand the template set for your theme > Header Templates > header

Adding the CSS is the cleaner way of doing it, but either will work.

Matt, you are a true star ...... i found the first method and it worked!
now this may sound simple to a lot of people but im new to this. i can put up an HTML site in minutes .... but forum stuff is new.

now i have changed the
<a href="{$mybb->settings['bburl']}/index.php"><img src="{$theme['logo']}" alt="{$mybb->settings['bbname']}" title="{$mybb->settings['bbname']}" style="max-width:100%" /></a>


can i still add the

#logo img {
max-width:100%;
}

to the css as well, and is it literally copy and paste that cod onto the bottom of the page

dont suppose you know how i can get the header/log central
Yes, you can just add it to the end of the global.css file. However you then won't need the header template edit, only one of the changes will be enough, you won't need both Smile
any idea about getting it central? and will i do any harm if i have both methods in place? (ok, i admit it....changing code makes me nervous so changing it back will give me a break down lol

Big Grin Big Grin Big Grin Big Grin Big Grin Big Grin
(2022-04-14, 09:13 AM)iqranawaz Wrote: [ -> ]Your app or website will not mobile friendly that's why you faces problems on mobile.

how do i make it mobile friendly?