It seem to be a silly question and possibly a dupe, but I couldn\'t find a good solution for a while, so finally dare to ask.
I want to place an
The flexbox solution would be my first choice. Since someone else has already answered with that idea I came up with this different approach.
Basically it is the absolute centering technique and rely on absolute position and auto margin to center the element.
body {
height: 100vh;
margin: 0;
}
svg#picture {
max-height: 15cm;
max-width: 15cm;
height:100%;
width:100%;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
margin:auto;
}