Quiero hacer algo como lo siguiente. Obtenga la altura de .content y luego agregue esa altura más 27vw a la altura de .container.
¿Es esto posible?
let imageHeight = $('.content').height(); $('.container').css('height', imageHeight - '27vw');Puede usar la función calc CSS para agregar 27vw a la altura del elemento:
let imageHeight = $('.content').height(); $('.container').css('height', `calc(${imageHeight}px + 27vw)`); .container{ background-color:grey; } .content{ height:1vw; background-color:yellow; } <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <div class="content"></div> <div class="container"></div>