<!DOCTYPE html>
<html>
<head>
<style>
#myDIV {
display: inline-block;
margin: 10px 0;
border: solid black 1px;
background-color: lightblue;
max-inline-size: 400px;
}
</style>
</head>
<body>
<h1>Change max-inline-size property with JavaScript</h1>
<p>Click the "Try it" button to change the max-inline-size values of the DIV element:</p>
<button onclick="myFunction()">Try it</button>
<br>
<div id="myDIV">
<p>This is my DIV element.</p>
</div>
<script>
function myFunction() {
document.getElementById("myDIV").style.maxInlineSize = "60px";
}
</script>
</body>
</html>