I'm currently facing an issue with calculating my container height, and it doesn't seem to be affecting the UI as expected. I've tried to set the height using the following code, but it's not taking effect:
h-[calc(${SectionHeight}px-45px)]
Where Section Height is The Parent Container Height i am calculation it becz also this Piece of code doesnt work
h-[calc(100%-45px)]
As per the documentation:
You could consider using the
styleattribute instead, like (assuming this is React):Or, since
SectionHeightis in pixels, we can subtract 45 in JavaScript-land like:Since we pass a
numbertype, React will automatically append thepxunit.