I sometimes find it convenient to give the size of an element in terms of the bottom
, top
, left
and right
properties, rather than using width
and height
. This is, for example, the accepted answer here:
CSS 100% height with padding/margin
However, for some reason this doesn't work with an svg
element. I've tried the following example with the latest stable Firefox and Chrome. The svg
element inexplicably wants to take a size of 300x150:
Why?