[ARCHIVED] calc(% - px)

Jump to solution
josuecarames
Community Explorer

Is it possible to use the following js function in pages? 

 

 

width: calc(100% - 10px)

 

 

If not, is there any other alternative? I find myself very limited while creating responsive pages in Canvas. Any advice that does not include third-party tools? I just rather hard code everything needed myself. 

Thank you!

Labels (2)
0 Likes
1 Solution
MitchellGuihot
Community Member

Hi Josue,

This is valid CSS that can be used withn Canvas pages.

You can place this within a style tag on your element and it should work fine.

Below is an example:

<div style="width: calc(100% - 10px); height: 400px; background: blue;">Some Content</div>

This will make this div 10 pixels smaller than its parent.

View solution in original post