Jump to content

Announcement Bar Image Centering

Recommended Posts

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

Link to comment
  • Replies 9
  • Views 1.3k
  • Created
  • Last Reply

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

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment
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 (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment
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 (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment
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!

Link to comment
  • 4 months later...

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.