
CSS ELI5: Float: Left; - jancsika
Suppose I have an inline SVG that I want to take up the entire width and height of the viewport. I also want to leave overflow visible for the container of my SVG-- this is so that scrollbars will appear when users of my webapp create SVG shapes that extend past the boundaries of the viewport.<p>So I set the body&#x27;s margin to 0, I set my SVG&#x27;s width and height to the viewport width&#x2F;height (plus setting viewBox to &quot;0 0 $width $height&quot;).<p>If I&#x27;m in quirksmode I&#x27;m done.<p>If I&#x27;m not in quirksmode, I get unexpected scrollbars unless I set the SVG&#x27;s style to &quot;float: left;&quot;.<p>So what is &quot;float: left;&quot; doing to save the day? And why is old quirks web the web of least surprise  in this case while HTML5 requires me to do CSS incantations to fit an element precisely inside a cavity?<p>Edit: clarification
======
egfx
Ask this guy, he knows.. [https://twitter.com/ppk](https://twitter.com/ppk)

He's shared the deepest insights into this topic for many years.

([https://www.quirksmode.org/about/](https://www.quirksmode.org/about/))

~~~
jancsika
He doesn't have an email address listed anywhere, and his page says he stopped
dev'ing in 2007.

~~~
egfx
He still tweets doesn’t he?

