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

Edited by haan
Link to comment
  • haan changed the title to How to centre align script with an icon
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

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

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

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.