Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

Reduce logo loading size on mobile.


missmegabug21
Go to solution Solved by IXStudio,

Question

Site URL: https://www.missmegabug.com/

Hello! I added code to my footer code injection to have my logo appear when my website is loading. It looks fine on desktop and tablet, but it does not adjust well to mobile view (see photo below).

I've tried customizing my code, but the changes I've made deactivate the load screen. Help! (Please. =))

I'm on Squarespace 5 using Foster template and my hosting plan is Advanced E-Commerce.

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<div class="logoload"></div>
<script>
$(function() {
  var loadLogo = $('header').find('img').attr('src');
  $('.logoload').css('background-image', 'url(' + loadLogo + ')');
});
</script>
<style>
.logoload {
  /* SET BACKGROUND COLOR */
  background-color: #fff;
  /* SET BACKGROUND SIZE */
  background-size: 500px;
  position: fixed;
  left: 0px;
  top: 0px;
  width: 100%;
  height: 100%;
  z-index: 9999;
  background-position: center;
  background-repeat: no-repeat;
}
</style>
<script type="text/javascript">
$(window).load(function() {
    $(".logoload").delay(300).fadeOut("slow");
})
</script>
<script>
$(window).load(function(){
$('.markdown-block .sqs-block-content h2').css('cursor','pointer');
$(".markdown-block .sqs-block-content h2").nextUntil("h2").slideToggle();
$(".markdown-block .sqs-block-content h2").click(function({
$(this).nextUntil("h2").slideToggle();
});
});
</script>

 

Load Logo.png

Link to post
  • Answers 3
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

Popular Posts

Hi Use this code in Design -> Custom CSS @media screen and (max-width:640px) { .logoload { max-width: 100% !important; background-size: 80% !important; } } Please use the like b

Posted Images

3 answers to this question

Recommended Posts

  • 0

You can add this to Home > Design > Custom CSS to set new image on mobile only

@media screen and (max-width:640px) {
.logoload {
	background-image: url(https://cdn.pixabay.com/photo/2020/03/09/14/54/seychelles-4916045__340.jpg) !important;
}
}

If it doesn't work, try save & refresh & check in real mobile

You can send your question to my email to get detail answer. / How to Setup Password & Share URL 

-- I'm seriously sick. Off some time.

Link to post
  • 0

Hi there! I'm not trying to change my logo, I want my logo to be the loading screen whether on desktop, tablet, or mobile. I just want to shrink it on mobile so the entire logo is in view instead of cut off. Is there a way to do that? Thank you!

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...