Hi. I'm trying to use the following calculation on an a.myselectorname element with my stylesheet in Flare.
margin-top: calc(100vh + var(--offset));
This isn't working though. What am I doing wrong? It works fine on codepen.
Jim
Using the Calc CSS Property on a Button
-
- Propeller Head
- Posts: 85
- Joined: Tue Jun 04, 2013 9:49 am
- Location: Arkansas, U.S.A.
Re: Using the Calc CSS Property on a Button
The calculation part should work fine, assuming you've defined --offset in the stylesheet.
But the <a> tag is displayed inline (by default), so a margin setting wouldn't work on an inline element anyway.
You could try display: inline-block;
But the <a> tag is displayed inline (by default), so a margin setting wouldn't work on an inline element anyway.
You could try display: inline-block;