I have this code:
<div class="testexample" style="top:@example.Y px"></div>
I thought this would work fine, but the browser is complaining about the spaces in the style.
(Invalid property value)
Any ideas to solve this?
I have this code:
<div class="testexample" style="top:@example.Y px"></div>
I thought this would work fine, but the browser is complaining about the spaces in the style.
(Invalid property value)
Any ideas to solve this?
You can put the whole string inside an expression syntax like this:
<div class="testexample" style="top:@(example.Y + "px")"></div>
instead of this you can use it in calc
<div class="testexample" style="top:calc( @example.Y )px"></div>
or
<div class="testexample" style="top:(@example.Y)px"></div>