Check out my website which currently has a fixed max-width
. I am interested in enhancing the user experience by adding a draggable border to the sides, allowing users to adjust the width based on their preference. Many online suggestions involve complicated JavaScript implementations to achieve this effect, but it seems that CSS now supports this feature more easily. However, I am facing difficulties implementing this for the body
element. Am I missing something or is it not possible to apply this property to the body
tag?
Below is a simple example with minimal code. If you notice any errors, please let me know:
body {
/* Example design settings */
padding-left: 20px;
padding-right: 20px;
max-width: 90vw;
/* Resize Properties */
resize: both;
overflow: hidden; /* dependent on desired experiment */
border: 1px solid green;
}
<html>
<body>
<p>This is a lengthy text that can be dragged and adjusted as needed</p>
</body>
</html>