i came across this page CSS LINK i could't help but love the idea of that to calculate the outcome of different units... however i tried this :
$('selector').css({'width':'calc(100%-20px)'});
but it doesn't work... anyone has any ideas how this works , or why doesn't this work?
jQuery supports the calc(). I have used this so many times:
$(".content-section").css('width','calc('+contentSectionWidth+'% - 15px)');
$(".content-section").css('width','calc(100% - 15px)');
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