Layout - intrinsic with auto margin
Image should be centered using the intrinsic ratio and the hight
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>margin-auto.html</title>
<style>
@page {
size: 400pt 300pt;
margin: 0;
}
div#center {
background: red;
width: 50%;
max-width: 300pt;
min-width: 200pt;
margin: 100pt auto;
text-align: center;
}
.logo {
max-height: 20pt;
display: block;
margin: auto;
}
</style>
</head>
<body>
<div id="center">CENTER</div>
<div>
<img class="logo" src="typeset.sh-logo.svg" />
</div>
</body>
</html>
Edited by Jacob Siefer