Wednesday, August 3, 2011

[Rails] Dynamic Inline CSS

So I'm making a user profile page for my app. However I want the
user's avatar to have an inset white box-shadow. Therefore using <img /
> isn't an option since it doesn't support inset shadows (or at least
not in Chrome). So instead I'm using a <div> with some inline css to
set the image. Here's kinda what I want but of course it wont work.

<div id="avatar" style="<%= current_person.avatar %>"></div>

Can anyone point me in the right direction for doing this?

--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate