Does Rails provide a means for determining the width of the viewing area? What I''d like to do is to be able to say something like, ''style="width: 100%-140px"''. Thanks. ... doug --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
that''s a server side issue, so it''s not as much as Rails issue as a Javascript issue. And as far as I know, Rails doesn''t have any helpers for that kind of function. Try looking around for the terms javascript and window.width. that should get you started... On 4/12/07, doug <ddjolley-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > Does Rails provide a means for determining the width of the viewing > area? What I''d like to do is to be able to say something like, > ''style="width: 100%-140px"''. Thanks. > > ... doug > > > > >-- Mike Weber Web Developer UW-Eau Claire --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 12 Apr 2007, at 19:54, doug wrote:> Does Rails provide a means for determining the width of the viewing > area? What I''d like to do is to be able to say something like, > ''style="width: 100%-140px"''. Thanks.The width of a viewing area is a clientside thing, Rails is a serverside framework. You need to look into Prototype (a JavaScript framework), which has functions to handle this kind of thing. I can recommend the "Prototype & Scriptaculous in Action" book from Manning as well as the prototype API on Position: http://prototypejs.org/api/ position A google search should also bring up a couple of things. Best regards Peter De Berdt --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks to all. With the help I obtained, I got it working. The point about the dimensions of the viewing area being a client-side thing is well taken. Thanks again. ... doug --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---