Size div dynamically

Giganews Newsgroups
Subject: Size div dynamically
Posted by:  Andrew Poulos (ap_pr…
Date: Sun, 25 Oct 2020

I have a div with this CSS

#container {
  position: absolute;
  left: 360px;
  top: 100px;
  overflow: hidden;

If the window's width is less than 1000 (360 + 640px) and greater than
360px how do I get the width of the div to change so it doesn't exceed
the window width?

To add a wrinkle, the div will be draggable so I'd like the div to be
able to grow to it's intrinsic width, if there' space for it.

Andrew Poulos