I'm a beginner in javascript, how can I set an element (div) with id="container? My option is like this, but it doesn't work.
$('#container').style.height = fit_content
You can use jquery, or you can without it
CodePudding user response:
With jQuery
:
$('#container').css('height', 'fit-content');
Without:
document.getElementById('container').style.height = 'fit-content';