Jump to content

[Share] Move Scrolling Block to Announcement Bar

Go to solution Solved by tuanphan,

Recommended Posts

Posted

You can follow these steps. If you can't make it work, you can comment below or message me.

#1. Edit Site Footer

image.png.6e07ed636c269e6fcbe522cb44aaf75c.png

#2. Add a Scrolling Block

image.png.18a7a978190678aa8f156e85e01379a9.png

#3. Use this code to Website > Website Tools > Code Injection > Footer

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
$(document).ready(function(){
  setTimeout( function() {
          $('footer.sections .marquee-block').appendTo('#announcement-bar-text-inner-id');
    }, 2000);
});
</script>
<style>
div#announcement-bar-text-inner-id * {
    color: white !important;
}
#announcement-bar-text-inner-id p {
    display: none !important;
}
span.sqs-announcement-bar-close {
    display: none;
}
</style>

image.png.7183e1bb8c11bb619884f16e24d328bf.png

#4. Result

image.png.f5ffba0dddecfa7ff83bd9c12869d789.png

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

  • 3 months later...
  • Replies 9
  • Views 1.6k
  • Created
  • Last Reply

Top Posters In This Topic

Posted (edited)

Hi! @tuanphan

Thanks for adding this here, I've been trying to make it work but the scrolling block isn't moving from the footer. When I paste the above code into the footer injection area part of its highlighted red. I've tried replacing with some other selectors but haven't made any progress. Do you have any thoughts?

Thanks so much in advance,
Sam

url: https://archivegoods.squarespace.com/
pw: backandforth

Screenshot 2024-09-28 at 9.19.00 AM.png

Edited by samschwan
added screenshot of code error
  • Solution
Posted
8 hours ago, samschwan said:

Hi! @tuanphan

Thanks for adding this here, I've been trying to make it work but the scrolling block isn't moving from the footer. When I paste the above code into the footer injection area part of its highlighted red. I've tried replacing with some other selectors but haven't made any progress. Do you have any thoughts?

Thanks so much in advance,
Sam

url: https://archivegoods.squarespace.com/
pw: backandforth

Screenshot 2024-09-28 at 9.19.00 AM.png

You missed ' symbol here

image.thumb.png.39ef49e8808b1f30d82a052c8e561b6f.png

see my original code

image.thumb.png.3f39b504af1aa36ab54dc03b63dc3385.png

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Posted

@tuanphan Sorry I didnt know that was a step in the process, thanks for catching! I've enabled it but now the blue background of the scrolling block I added is moved within a black box where the announcement bar would be.


image.thumb.png.066d2a8b6a3b32e81c6a90abe45208ec.png

Posted
6 hours ago, samschwan said:

@tuanphan Sorry I didnt know that was a step in the process, thanks for catching! I've enabled it but now the blue background of the scrolling block I added is moved within a black box where the announcement bar would be.


image.thumb.png.066d2a8b6a3b32e81c6a90abe45208ec.png

Add this CSS (Custom CSS box) to override it

div.sqs-announcement-bar-dropzone .marquee-block {
    background-color: transparent !important;
}
#announcement-bar-text-inner-id .marquee-block p {
    display: block !important;
}

image.thumb.png.cdb8df9735f012aeaa505e93f72ca26d.png

image.png

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Posted (edited)

@tuanphan Thanks so much! Thats solved most of everything. Now I'm just stuck on figuring out how to get the text color back to black. I was able to change the padding and background color easily but the text color isn't updating for some reason. 

This is what I've been trying:

 

//////* ANNOUNCEMENT BAR *//////
.sqs-block-marquee p {
font-size: 12px !important;
line-height: 16px !important;
}

.sqs-announcement-bar-text {
padding: .5rem 0rem !important;
}

.marquee-block {
padding: 0px !important;
background-color: #A1D3EF !important;
}

div.sqs-announcement-bar-dropzone .marquee-block {
    background-color: transparent !important;
}

#announcement-bar-text-inner-id .marquee-block p {
    display: block !important;
}

div#announcement-bar-text-inner-id * p {
color: black !important;
}
 

Edited by samschwan
Added Code
Posted
3 hours ago, samschwan said:

@tuanphan Thanks so much! Thats solved most of everything. Now I'm just stuck on figuring out how to get the text color back to black. I was able to change the padding and background color easily but the text color isn't updating for some reason. 

This is what I've been trying:

 

//////* ANNOUNCEMENT BAR *//////
.sqs-block-marquee p {
font-size: 12px !important;
line-height: 16px !important;
}

.sqs-announcement-bar-text {
padding: .5rem 0rem !important;
}

.marquee-block {
padding: 0px !important;
background-color: #A1D3EF !important;
}

div.sqs-announcement-bar-dropzone .marquee-block {
    background-color: transparent !important;
}

#announcement-bar-text-inner-id .marquee-block p {
    display: block !important;
}

div#announcement-bar-text-inner-id * p {
color: black !important;
}
 

In Code Injection, edit this code

image.thumb.png.a47f71ea6194d7c6401a6fef2b2ec9b6.png

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Create an account or sign in to comment

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


×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.