Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<head>
<style> 
#myDIV {
  width: 50%;
  margin: 10px 0;
  border: solid black 1px;
  background-color: lightblue;
  min-block-size: 200px;
}
</style>
</head>
<body>
<h1>Change min-block-size property with JavaScript</h1>
<p>Click the "Try it" button to change the min-block-size values of the DIV element. The content keeps the box from getting smaller in the block direction:</p>
<button onclick="myFunction()">Try it</button>
<div id="myDIV">
  <p>This is my DIV element.</p>
  <p>This text is for filling the box.</p>
  <p>This text is for filling the box.</p>
</div>
<script>
function myFunction() {
  document.getElementById("myDIV").style.minBlockSize = "10px";
}
</script>
</body>
</html>