[ARCHIVED] calc(% - px)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2021
02:09 PM
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!
Solved! Go to Solution.
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2021
04:56 PM
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.
This discussion post is outdated and has been archived. Please use the Community question forums and official documentation for the most current and accurate information.