Logo at small mobile size

Permalink Browser Info Environment
Hello

I have tried to fix this myself but I am stumped. I have a relatively large logo on the site which is fine until you go to very small mobile phone size (iphone 5 for example) when the logo pops out of the header and sits underneath looking very messy. This happened after I modified the search bar to make the icon open an email address therefore there was less room on the header. I think this would happen on your Modena theme too if your logo was bigger as the navigation pops out of the header there too. Also the dropdown search box (now an email button) jumps quite far down the page.

However as soon as you start scrolling, the logo resizes as specified in the theme options and it looks perfect and the search box sits nicely underneath the header. I tried to make the smallest breakpoint load the resized logo before scrolling (ie when you first load the page) but I'm afraid I am completely stuck. Do you have a better idea? Or point me in the right direction?

I hope I have explained myself!

The site is here:

https://www.hereisyoursite.co.uk/icmi/...

Thank you!

Lucy

Type: Pre-Sale
Status: Resolved
ppisoban
View Replies:
VidalThemes replied on at Permalink Reply
VidalThemes
Hi Lucy,

Sorry for the delay getting back to you.

Unfortunately, there is not a huge amount you can do about this, to get the resizing of the logo on scroll to work you cannot constrain the dimensions of the image, so if you use a larger logo on a very small screen it won't shrink enough to fit. a few things to have a look at if you haven't already:

The email icon looks like it has some extra padding on the left at mobile sizes, it might be an idea to remove that it could give you some pixels back.

You could look into writing a media query to fix the logo to a certain size at say under 320px screen width, it may look a bit odd as it won't resize when scrolled but should look a bit more sane, I have an agency partner who had a similar requirement you may be able to figure out the CSS from here:http://adtech.co.uk/

Sorry I can't be of more help, if anything springs to mind I will be sure to let you know.

Best regards

David
ppisoban replied on at Permalink Reply
ppisoban
Hi David

Thanks for your reply. I managed to get the logo to resize at smaller screen sizes by adding this code in the Custom Css (in case it helps anyone else):

@media only screen and (max-width: 415px){
.ccm-page .primary-header img { max-width: 170px;
max-height: 69px;
margin-top: 10px; }
}

It took a bit of jiggery pokery to get there but now everything fits nicely at small screen sizes.

Thanks again

Lucy
VidalThemes replied on at Permalink Reply
VidalThemes
Hi Lucy,

Thanks for letting me know, and thanks for sharing the code snippet, I am sure someone will find that of use.

Best regards

David

concrete5 Environment Information

# concrete5 Version
Core Version - 8.5.1
Version Installed - 8.5.1
Database Version - 20190301133300

# concrete5 Packages
Bootstrap Blocks (0.9.7), ExchangeCore reCAPTCHA (1.1.1), Location Map (1.0.11), Modena Theme (1.0.3), Responsive Embed (1.0.1), Simple Gallery (1.0.9), Spacer (0.9.4)

# concrete5 Overrides
None

# concrete5 Cache Settings
Block Cache - On
Overrides Cache - On
Full Page Caching - Off
Full Page Cache Lifetime - Every 6 hours (default setting).

# Server Software
LiteSpeed

# Server API
litespeed

# PHP Version
5.6.40

# PHP Extensions
bcmath, bz2, calendar, Core, ctype, curl, date, dom, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, imap, intl, ionCube Loader, json, libxml, litespeed, mbstring, mcrypt, memcache, mhash, mysql, mysqli, mysqlnd, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, Phar, posix, pspell, readline, Reflection, session, shmop, SimpleXML, soap, sockets, SourceGuardian, SPL, sqlite3, standard, tokenizer, wddx, xml, xmlreader, xmlwriter, xsl, Zend Guard Loader, Zend OPcache, zip, zlib

# PHP Settings
max_execution_time - 360
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 360
max_input_vars - 8000
memory_limit - 256M
post_max_size - 512M
sql.safe_mode - Off
upload_max_filesize - 512M
ic24.api.max_timeout - 7
memcache.max_failover_attempts - 20
mysql.max_links - Unlimited
mysql.max_persistent - Unlimited
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
session.cache_limiter - <i>no value</i>
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5
opcache.max_accelerated_files - 7963
opcache.max_file_size - 0
opcache.max_wasted_percentage - 5
zend_optimizerplus.max_accelerated_files - 2000
zend_optimizerplus.max_file_size - 0
zend_optimizerplus.max_wasted_percentage - 5

Browser User-Agent String

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You may not request a refund that is not currently owned by you.