Centre an SVG in a Div

Glenn Blog Leave a Comment

To centre an SVG in a div simply change its default ‘inline’ display to ‘block’ and then give it a margin of auto, so: – Still not centring, then give your SVG a ‘width’ property e.g. width: 200px;