Rails in css ..

Hello all,

Actually i am having a small problem.. googled it but did'nt find any
clue..
So what i want to do is that i want to insert ruby variable in css style
property.. as like ..
<div class="abc" style="left: <%= @var * 6 %> px;">
But this is not working.. I am doing it because i want to keep the left
property dynamic .. :slight_smile: Is there any possible way to do it ..

That should actually work. Are you sure @var has some value ?

Thanks & Regards,
Dhruva Sagar.

Joan Crawford - “I, Joan Crawford, I believe in the dollar. Everything I earn, I spend.”

Yups.. @var has value inside it.. and not working ..

In what way is it not working ?

Fred