Can anyone tell me how to align a svg rectangle in the center? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Can anyone tell me how to align a svg rectangle in the center?

I wanna make it look like a card with rounded corners, a shadow property and wanna add some text over it. I would like to use it as a header.

1st Sep 2018, 2:50 PM
Tanish Kushwaha
Tanish Kushwaha - avatar
1 Answer
+ 3
Alright I found the answer myself 😀. I just had to use margin: auto; in div. And I think using a svg for such purpose is not a good idea 😜.
2nd Sep 2018, 7:57 AM
Tanish Kushwaha
Tanish Kushwaha - avatar