Simple.. I'm running into a syntax error. $('#container').css('min-height', '360');
doesn't set a rule, but $('#container').css('height', '360');
does.
Help?
CSS Demo: min-heightThis is a box where you can change the minimum height. If there is more content than the minimum the box will grow to the height needed by the content. The element's height is set to the value of min-height whenever min-height is larger than max-height or height .
You could consider min-height: 100vh; . This sets the height equal or greater to the size of the screen, vh: vertical height .
– What is Min Height 100vh in CSS? Min height 100vh means the element should occupy the web browser viewport height. This is always 100 percent of the web browser's viewport height. If there is more content, the element will stretch more than the viewport's height, which is a code example that will clear things up.
If the content is smaller than the minimum height, the minimum height will be applied. If the content is larger than the minimum height, the min-height property has no effect. Note: This prevents the value of the height property from becoming smaller than min-height .
First try:
$('#container').css('min-height', '360px');
Otherwise try
$('#container').attr('style','min-height:360px;other-styles');
use
$('#container').css('min-height', '360px');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With