Rails in css ..

View: New views
5 Messages — Rating Filter:   Alert me  

Rails in css ..

by Adam Akhtar-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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 .. :) Is there any possible way to do it ..
--
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@...
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Rails in css ..

by Dhruva Sagar :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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."

On Tue, Nov 3, 2009 at 12:40 PM, Hemant Bhargava <rails-mailing-list@...> wrote:

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 .. :) Is there any possible way to do it ..
--
Posted via http://www.ruby-forum.com/.




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@...
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Rails in css ..

by Adam Akhtar-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Dhruva Sagar wrote:
> That should actually work. Are you sure @var has some value ?
>
> Thanks & Regards,
> Dhruva Sagar.
>
--
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@...
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Rails in css ..

by Frederick Cheung-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message




On Nov 3, 7:22 am, Hemant Bhargava <rails-mailing-l...@...>
wrote:
> Yups.. @var has value inside it.. and not working ..
>
In what way is it not working ?

Fred
> Dhruva Sagar wrote:
> > That should actually work. Are you sure @var has some value ?
>
> > Thanks & Regards,
> > Dhruva Sagar.
>
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@...
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Rails in css ..

by Adam Akhtar-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Works.. My problem ..
Newayz thanks for replies ..

Frederick Cheung wrote:
> On Nov 3, 7:22�am, Hemant Bhargava <rails-mailing-l...@...>
> wrote:
>> Yups.. @var has value inside it.. and not working ..
>>
> In what way is it not working ?
>
> Fred

--
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@...
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---