Jump to content

Adjusting size of SVG image added via code block

Recommended Posts

Hey ! I have a client that has a few icons on their website and they have requested I used SVG files instead of PNG to improve clarity. I've figured out how to add SVG files to Squarespace using code blocks, but now I'm stumped on how to control the width of the icons using CSS.
I've tried targeting the unique code blocks but that hasn't seemed to work. For example:
#block-yui_3_17_2_1_1617983377975_9584 {
max-width: 10%;
margin: 0 auto;
}
I've also tried adding a class to the code block:
<img src="/s/SEEDCOWORK_LOGO_HORIZONTAL_SOLID_WHITE__.svg" alt="Seed Coworking + Flexible Office Space" class="footer-logo-svg">
And then targeting the class:
.footer-logo-svg {
max-width: 10%;
margin: 0 auto;
}
But still no luck. Any suggestions?
Link to comment
  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

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.