Where to insert the svg html?

Thanks for the cursor tutorial! In reviewing your instructions for the custom pointer, I saw that you emphasized that the svg file needs a width and height designated for the custom cursor to be visible. Where does the html that includes the width and height values for the svg go? Thanks!

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi @juliemadermeersman,

Usually, the size of the SVG is selected when the SVG is created and as such is not needed to be specified.

Having said that, you can change the size of it though just by selecting the img and changing its width or height, again like you could a PNG or JPG.

Let’s say you have an image like so:

<img src="DigitalOcean.svg" alt="DigitalOcean SVG">

if you want to add height or width to is you can simply transform it to:

<img src="DigitalOcean.svg" alt="DigitalOcean SVG"width="500" height="600"> 

Now, if you want to add them as a class, you can do the following

<a href="/" class="logo">
.logo {
  display: block;
  text-indent: -9999px;
  width: 100px;
  height: 82px;
  background: url(DigitalOcean.svg);
  background-size: 100px 82px;

Hope this helps! Regards, KFSys