I want to generate a pdf of the layout. There will a fixed size for a div eg. The width of the div 720px and I want to maintain it 720 on all the devices. Since the div will go outside the screen on mobile devices I used to transform(scale) to make it small size but there is space below the div. I want to remove that space. below is the code for your reference.
.Scale {
background-color: #dddddd;
}
.blue {
background: blue;
}
.red{
background: red;
}
.Scale div {
width: 50px;
height: 50px;
}
.Scale {
transform: scale(0.5);
transform-origin: top left;
}
.parent{
border: 1px solid;
}
<div class="parent">
<div class="Scale">
<div class="red"></div>
<div class="blue"></div>
</div>
</div>
I am not 100% sure if thats what you are asking for but if you use ScaleX instead the space below is gone as you are only scaling on the X-axis.
Try the code below: