3214 Posts in 848 Topics by 810 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 826 Views |
-
Appending .px to template variable

20 February 2010 at 1:38pm
Hi,
How would I append to .px to a template variable.For example,
This in the template
<div id="FlashContainer" style="margin:$TopMargin.px 0 0 $LeftMargin.px">returns
<div id="FlashContainer" style="margin: 0 0 ">How do I add .px to the end of $TopMargin or $LeftMargin so that I get something like:
<div id="FlashContainer" style="margin:300.px 0 0 400.px">Thanks in advance,
Sam -
Re: Appending .px to template variable

20 February 2010 at 2:03pm Last edited: 22 February 2010 6:12pm
You need to escape the variable like {$Var}px
Edit - Woops, had a dot after the }. Thanks banal
-
Re: Appending .px to template variable

20 February 2010 at 8:22pm
Yes, what Will said, but skip the dot ;)
Like this:"margin: {$TopMargin}px 0 0 {$LeftMargin}px;"
-
Re: Appending .px to template variable

20 February 2010 at 8:42pm
Thanks Guys. It works!
For some strange reason I added an unnecessary period in front of the px in my original post.
Don't need it.Cheers,
Sam
| 826 Views | ||
|
Page:
1
|
Go to Top |



