I have a two style sheets. One for IE and one for all the other browsers. Now I need browser detection so I know which style sheet to load. I understand that there is request.user_agent. My question is what is the string I need to test for? Thanks for your time in advance, Mitch -- 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-/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 -~----------~----~----~----~------~----~------~--~---
Why not simply use an HTML conditional statement such as: <!--[if IE]> IE Conditional Comment: Internet Explorer <![endif]--> I haven''t used this before, though TextMate has it built in under conditionals within the HTML commands. This one would actually be better: <!--[if !IE]><!--> IE Conditional Comment: NOT Internet Explorer <!-- <![endif]--> Let me know if that helps! ~Dustin Tigner On Jul 29, 7:38 am, Mitchell Gould <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> I have a two style sheets. One for IE and one for all the other > browsers. > > Now I need browser detection so I know which style sheet to load. > > I understand that there is request.user_agent. > > My question is what is the string I need to test for? > > Thanks for your time in advance, > > Mitch > -- > 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org 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 -~----------~----~----~----~------~----~------~--~---
I'm confused... why would conditional comments prevent you from changing the font size? Set it in the main style sheet, override it in the IE sheet. On Tue, Jul 29, 2008 at 10:19 AM, Mitchell Gould < rails-mailing-list@andreas-s.net> wrote:> > Dustin Tigner wrote: > > Why not simply use an HTML conditional statement such as: > > > > <!--[if IE]> IE Conditional Comment: Internet Explorer > > <![endif]--> > > > > I haven't used this before, though TextMate has it built in under > > conditionals within the HTML commands. This one would actually be > > better: > > > > <!--[if !IE]><!--> IE Conditional Comment: NOT Internet Explorer > > <!-- <![endif]--> > > > > Let me know if that helps! > > > > ~Dustin Tigner > > > > On Jul 29, 7:38�am, Mitchell Gould <rails-mailing-l...@andreas-s.net> > > Hey Dustin, > I was using that and it works fine. However I need to switch to switch > css pages depending on the browser because I need to change the size of > the font with css. > So I was thinking of detecting the browser on the server. Then directing > to the appropriate css file. > Have any ideas on this? > > Mitch > -- > 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@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 -~----------~----~----~----~------~----~------~--~---
Brian Hogan wrote:> I''m confused... why would conditional comments prevent you from changing > the > font size? > > Set it in the main style sheet, override it in the IE sheet. > > > On Tue, Jul 29, 2008 at 10:19 AM, Mitchell Gould <Thanks I just realized that. I know what to do. Thanks for that. Cheers, Mitch -- 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-/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 -~----------~----~----~----~------~----~------~--~---
Hi Mitch, Mitchell Gould wrote:> > I have a two style sheets. One for IE and one > for all the other browsers. > > Now I need browser detection so I know which > style sheet to load. > > I understand that there is request.user_agent. > > My question is what is the string I need to test for?This thread should help. http://lists.rubyonrails.org/pipermail/rails/2006-April/032625.html Best regards, Bill --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Bill Walton wrote:> Hi Mitch, > > Mitchell Gould wrote: >> >> I have a two style sheets. One for IE and one >> for all the other browsers. >> >> Now I need browser detection so I know which >> style sheet to load. >> >> I understand that there is request.user_agent. >> >> My question is what is the string I need to test for? > > This thread should help. > > http://lists.rubyonrails.org/pipermail/rails/2006-April/032625.html > > Best regards, > BillThanks Bill that will come in handy, Mitch -- 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-/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 -~----------~----~----~----~------~----~------~--~---