@wonderlust101
Posted
Regarding your second challenge, the path for the SVG is not correct. From what I see in github, you structure your files like this:
:root
|assets/
|--images/
|---- ellipse.svg
|styles/
|--styles.css
|index.html
|ellipse.svg (another copy assume)
Right now in your CSS you got:
content: url("/assets/images/ellipse.svg");
Which assume that there is a folder is styles like below (which is not):
:root
|assets/
|--images/
|---- ellipse.svg
|styles/
|--assets/
|----images/
|------ ellipse.svg
|--styles.css
|index.html
|ellipse.svg
What you need to do is to direct it backwards by using ../
which will result your code looking like this:
content: url("../assets/images/ellipse.svg");
This applies to many coding languages if your dealing with files management. You can also stack them to access nested folders like this:
("../../../path/to/file/file.js");
Hopefully that helped and wasn't confusing.
Regarding your first challenge, I don't know much about it so hopefully someone corrects me if what I say is true or not. The SVG anchor points are usually in the top-left so I assume that's the reason why it shifted down. There has been a few times where I coded some 2D games and I had to shift it to be centered properly so maybe that's the reason. Again, I don't entirely know why but that's my assumption.
EDIT: I'm also not entirely sure why your able to see your markers on VS Code since I don't use it. It might be a setting or something.
Marked as helpful
@jguleserian
Posted
@wonderlust101
Wow! Thank you so much for the help. And no, it wasn't confusing at all. I guess when I was writing, I was referencing everything from the perspective of the root folder forgetting all the time that I was in the styles folder. I really appreciate you catching that for me. That really solves some frustration I've been having.
In fact, I just corrected the reference to the .svg (and deleted the extra copy in the root folder - yes, it was there as an attempt to overcome the problem) and it works perfectly. I am so grateful!
Thank you again! And thank you for taking the time to help me.
Jeff