Why do you need to specify widtg and height attributes in both svg and rect elements? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why do you need to specify widtg and height attributes in both svg and rect elements?

3rd Nov 2017, 10:06 AM
Abdussamad Nasir
Abdussamad Nasir - avatar
2 Answers
+ 4
Because <rect> is a shape inside the <svg> container, and you don't necessarly want to set it as same size than its parent ^^
3rd Nov 2017, 10:14 AM
visph
visph - avatar
0
thanks
3rd Nov 2017, 10:16 AM
Abdussamad Nasir
Abdussamad Nasir - avatar