Calculate Div Width via CMS
Calculate the width of a div using percentages from two numbers in a collection CMS list in Webflow.
Calculate the width of a div using percentages from two numbers in a collection CMS list in Webflow.
How to add it
- Add CSS via HTML embed or head section of custom code settings
The code
CSS
<!-- Add via HTML embed or head custom code section -->
<style>
.your-class {width:calc(AddYourFirstNumberHere / AddYourSecondNumberHere * 100%);}
</style>