I have the page below and I expect to have the exact same result for both containers but it seems than #container1
is not resized after the scale in CSS. Is there a way to resize it, preferably in CSS only?
body {
background: #ccc;
padding: 20px;
}
#scaleable1 {
transform-origin: left top;
background: white;
transform: scale(0.5);
height: 100px;
width: 400px;
font-size: 14px;
}
#container1 {
background: #666;
}
#scaleable2 {
background: white;
height: 50px;
width: 200px;
font-size: 7px;
}
#container2 {
position: relative;
background: #666;
}
<div id="container1">
<div id="scaleable1">
<h1>Something</h1>
</div>
</div>
<div id="container2">
<div id="scaleable2">
<h1>Something</h1>
</div>
</div>