kaitschmidek Posted April 9, 2021 Share Posted April 9, 2021 Hey Beatriz ! 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
creedon Posted April 9, 2021 Share Posted April 9, 2021 Try the following. #block-yui_3_17_2_1_1617983377975_9584 img { max-width : 10%; } This is specific to the OP's need. Let us know how it goes. Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects. Link to comment
kaitschmidek Posted April 14, 2021 Author Share Posted April 14, 2021 @creedon that worked perfectly. Thanks! creedon 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment