1

A simple document:

svg {
  background-color: blue;
}
div {
  background-color: green;
}
svg, div {
  width: 100%;
  height: 100px;
}
<svg></svg>
<div></div>

And just in case it's just on my system (Chrome/Mac), here's how it comes out:

div and svg with a gap between them

I can't see any margin or border on either element, but there is a gap between the two elements. And it only happens with a svg there: if I replace the svg with another div, no gap.

Where does it come from, and how do I make it go away?

Amadan
  • 191,408
  • 23
  • 240
  • 301

0 Answers0