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

Announcement Bar Image Centering


Toni

Question

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

9 answers to this question

Recommended Posts

  • 0

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

Greeting, it's BaNgan from BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Portfolio hover Replace Link Style
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you

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

Link to comment
  • 0
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, 

Greeting, it's BaNgan from BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Portfolio hover Replace Link Style
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you

Link to comment
  • 0
7 hours ago, Toni said:

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

Thank you!!!

Do you still need help on this?

Email me if you have need any help (free, of course.). Answer within 24 hours.

How to: Setup password & share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care - Learn CSS - Custom Popup - Testimonial Slider

I'm Tuan, blogger/owner of a free library for children in Vietnam. Helping the community is a hobby. Contact me via email.

Link to comment
  • 0
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

Greeting, it's BaNgan from BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Portfolio hover Replace Link Style
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you

Link to comment
  • 0
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

Create an account or sign in to comment

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

×
×
  • Create New...