Jump to content

How to centre align script with an icon

Recommended Posts

Hi, hope someone can help me out.

I have a script with an icon which I want to embed on top of textblock. I want to use the <embed> function using this code:

<script src="https://cdn.lordicon.com//libs/frhvbuzj/lord-icon-2.0.2.js"></script>
<lord-icon
    src="https://cdn.lordicon.com//nocovwne.json"
    trigger="loop"
    colors="primary:#121331,secondary:#b4b4b4"
    style="width:50px;height:50px">
</lord-icon>

How can I align this icon in the centre of the block? It is now aligned to the left.

Thank you in advance

Link to comment
  • haan changed the title to How to centre align script with an icon
  • Replies 4
  • Views 1.3k
  • Created
  • Last Reply
On 5/27/2021 at 2:07 PM, haan said:

Hi Tuanphan,

Yes here you go!

https://www.wallbuddy.co/new-index

 

Add to Design > Custom CSS

/* align center icons */
section#description-foster .embed-block>div {
    text-align: center;
}

 

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

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.