Jump to content

Announcement Bar Image Centering

Recommended Posts

Posted

I added in some custom coding:

.sqs-announcement-bar:before {
  content:"";
background-image: url(https://static1.squarespace.com/static/5f2364303585643acdb40436/t/5fb2c91df7db0b10ea3baddc/1605552413449/Courage+Matters+App+Icon.png);
  background-repeat: no-repeat;
  background-size: 40px;
float: left;
  width: 40px;
  height: 40px;
}

 

However with this, I can't seem to get the image that I added to float centered and be on the same line as the text as opposed to pushed to the corner. I've included a screenshot for reference. Anyone have any tips?

Announcement Bar.png

  • Replies 9
  • Views 1.4k
  • Created
  • Last Reply
Posted
21 hours ago, bangank36 said:

you should sent your site url so we can provide code that surely work on your site

It's a private site for a client so I'm not able to unfortunately. However, I could create a demo account and set it up that way. Would that work for you? Appreciate the help!!

Posted
26 minutes ago, Toni said:

It's a private site for a client so I'm not able to unfortunately. However, I could create a demo account and set it up that way. Would that work for you? Appreciate the help!!

yes, pls do, 

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Pinch/Zoom images, videos - PDFs Lightbox - ...) </>  🗓️ Delivery Date Picker (Date picker form field)
Gallery block 7.1 workaround </> 🤖 Ask me anything

Posted
8 hours ago, Toni said:

Done! Website is https://pineapple-sponge-wtah.squarespace.com password is announcement.

Thank you!!!

.sqs-announcement-bar:before {
    content: "";
    background-image: url(https://static1.squarespace.com/static/5fb6ca1392bb323fea120acc/t/5fb6caac1c5dc67aaeb14be8/1605814956698/Courage+Matters+App+Icon.png);
    background-repeat: no-repeat;
    background-size: 40px;
    float: left;
    left: 5px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
}
.sqs-announcement-bar {
  	padding: 0 50px;
}

image.thumb.png.022affd388d1d2660578e79c9ad487d5.png

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Pinch/Zoom images, videos - PDFs Lightbox - ...) </>  🗓️ Delivery Date Picker (Date picker form field)
Gallery block 7.1 workaround </> 🤖 Ask me anything

Posted
3 minutes ago, bangank36 said:

.sqs-announcement-bar:before {
    content: "";
    background-image: url(https://static1.squarespace.com/static/5fb6ca1392bb323fea120acc/t/5fb6caac1c5dc67aaeb14be8/1605814956698/Courage+Matters+App+Icon.png);
    background-repeat: no-repeat;
    background-size: 40px;
    float: left;
    left: 5px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
}
.sqs-announcement-bar {
  	padding: 0 50px;
}

image.thumb.png.022affd388d1d2660578e79c9ad487d5.png

Thank you! That worked perfect!

  • 4 months later...
Posted

i am having the same issue |? added image to annoucement bar but cannot centre image so it is on the left of text ? www.maxishop.ca 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.