0

hey guys, what am i doing wrong, the circle in the svg isn't drawing.

if i remove the path, it is drawn or if i shuffle the two such that the circle comes first before path, it gets drawn and the path doesn't. does this mean i can not draw two svg elements on top of each other? thank you in advance. here is the code, https://code.sololearn.com/WeLvr2pqGnKr/?ref=app

17th Apr 2020, 4:38 AM
Mark Etale
Mark Etale - avatar
7 Answers
+ 3
Remember elements are stacked. Your path is on top of your circle so the circle has to draw first. Move path down after circle. It's not drawing correctly because you didn't close your element tags. <circle ... /> <path ... />
17th Apr 2020, 4:58 AM
ChaoticDawg
ChaoticDawg - avatar
+ 3
They are mostly just one tag but need the closing forward slash. <circle /> Not <circle></circle> see example 2 https://www.w3schools.com/graphics/svg_path.asp see the g tags vs the path and circle tags in the svg.
17th Apr 2020, 5:05 AM
ChaoticDawg
ChaoticDawg - avatar
+ 2
That's because it's looking for the / and sees it there. The extra < and circle aren't needed. Check example in edited previous post.
17th Apr 2020, 5:11 AM
ChaoticDawg
ChaoticDawg - avatar
+ 2
okay, thanks anyway
17th Apr 2020, 5:13 AM
Mark Etale
Mark Etale - avatar
+ 1
thanks,,, it has worked. i thought those svg elements do not require closing tags
17th Apr 2020, 5:02 AM
Mark Etale
Mark Etale - avatar
+ 1
but have tried this </circle> and it has worked
17th Apr 2020, 5:07 AM
Mark Etale
Mark Etale - avatar
+ 1
wow i learned some knew tags just now thanks
19th Apr 2020, 12:23 AM
David Paredes
David Paredes - avatar