Jump to content

Moving the Announcement Bar

Recommended Posts

  • Replies 4
  • Views 1.2k
  • Created
  • Last Reply

Top Posters In This Topic

18 hours ago, mattvrgs said:

Site URL: https://vanilla-collie-xre6.squarespace.com/

PW: 123456

Hi there!

So, I've positioned the Announcement Bar where I want it on desktop, but every time the screen size changes it gets all messed up. Is there a way I can force the position to the top of the dark gray section so it will always be there? I super appreciate the help!

Add to Design > Custom CSS

/* Announcement bar */
.sqs-announcement-bar-dropzone {
    position: absolute !important;
    top: 0;
    z-index: 999;
    left: 0;
    width: 100%;
}
article section:nth-child(-n+2) {
    margin-top: 100px !important;
}

 

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!)

Link to comment
On 5/1/2021 at 4:00 AM, tuanphan said:

Add to Design > Custom CSS


/* Announcement bar */
.sqs-announcement-bar-dropzone {
    position: absolute !important;
    top: 0;
    z-index: 999;
    left: 0;
    width: 100%;
}
article section:nth-child(-n+2) {
    margin-top: 100px !important;
}

 

So, I already have this code on my site: 

 

.sqs-announcement-bar-dropzone {
    position: -webkit-sticky;
    position: sticky;
    top: 515px;
    z-index: 10001;
}

.sqs-announcement-bar-close {
    display: none;
}

I tried pasting the code on top of mine, and updating my code to yours and I had some weird things happen. There was a big empty space at the top of the header where the announcement bar was, and then when I went full screen it moved again.

This is the correct positioning. I was trying to force it to the top of section[data-section-id="608b1790a9d0f438db008209"] but haven't been able to figure out how. I appreciate it.

image.thumb.png.ee1fd8850d281ef83bf77a8506058707.png

Link to comment
  • 3 weeks later...

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.