I don''t enjoy getting involved in design much, mostly because of cross browser issues / css. Anyway, I''m needing a nice menu. Problem is , most of what is out there uses standard html links - <a href> And the css is coded around those elements. Is there a way to use <a href> with link_to . I know i can probably just define a class , but wonder if there is an easier way. Stuart -- http://en.wikipedia.org/wiki/Dark_ambient --~--~---------~--~----~------------~-------~--~----~ 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 Nov 16, 2006, at 8:29 PM, Dark Ambient wrote:> I don''t enjoy getting involved in design much, mostly because of > cross browser issues / css. > Anyway, I''m needing a nice menu. Problem is , most of what is out > there uses standard html links - <a href> > And the css is coded around those elements. > Is there a way to use <a href> with link_to . I know i can > probably just define a class , but wonder if there is an easier > way.link_to is simply a helper to generate standard HTML links (<a href="...">) so any Javascript or CSS techniques you would use with HTML can be used with the resulting code. Have you tried using link_to in a template and looking at the HTML that''s produced? (with the ''view source'' option in your browser). James. --~--~---------~--~----~------------~-------~--~----~ 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 11/16/06, James Stewart <jystewart-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > On Nov 16, 2006, at 8:29 PM, Dark Ambient wrote: > > I don''t enjoy getting involved in design much, mostly because of > > cross browser issues / css. > > Anyway, I''m needing a nice menu. Problem is , most of what is out > > there uses standard html links - <a href> > > And the css is coded around those elements. > > Is there a way to use <a href> with link_to . I know i can > > probably just define a class , but wonder if there is an easier > > way. > > link_to is simply a helper to generate standard HTML links (<a > href="...">) so any Javascript or CSS techniques you would use with > HTML can be used with the resulting code. > > Have you tried using link_to in a template and looking at the HTML > that''s produced? (with the ''view source'' option in your browser). > > James.I have, and know , it turns into a href, but it seems as if the styling is lost anyway. Stuart -- http://en.wikipedia.org/wiki/Dark_ambient --~--~---------~--~----~------------~-------~--~----~ 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 Nov 16, 2006, at 9:00 PM, Dark Ambient wrote:> On 11/16/06, James Stewart <jystewart-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> On Nov 16, 2006, at 8:29 PM, Dark Ambient wrote: >> > I don''t enjoy getting involved in design much, mostly because of >> > cross browser issues / css. >> > Anyway, I''m needing a nice menu. Problem is , most of what is out >> > there uses standard html links - <a href> >> > And the css is coded around those elements. >> > Is there a way to use <a href> with link_to . I know i can >> > probably just define a class , but wonder if there is an easier >> > way. >> >> link_to is simply a helper to generate standard HTML links (<a >> href="...">) so any Javascript or CSS techniques you would use with >> HTML can be used with the resulting code. >> >> Have you tried using link_to in a template and looking at the HTML >> that''s produced? (with the ''view source'' option in your browser). >> >> James. > > I have, and know , it turns into a href, but it seems as if the > styling is lost anyway.What is your full link_to call, and what''s the HTML you''re expecting to be output? James. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
dblack-TKXtfPMJ4Ozk1uMJSBkQmQ@public.gmane.org
2006-Nov-17 02:17 UTC
Re: Links for poor developers - <a href>
Hi -- On Thu, 16 Nov 2006, Dark Ambient wrote:> On 11/16/06, James Stewart <jystewart-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >> >> On Nov 16, 2006, at 8:29 PM, Dark Ambient wrote: >>> I don''t enjoy getting involved in design much, mostly because of >>> cross browser issues / css. >>> Anyway, I''m needing a nice menu. Problem is , most of what is out >>> there uses standard html links - <a href> >>> And the css is coded around those elements. >>> Is there a way to use <a href> with link_to . I know i can >>> probably just define a class , but wonder if there is an easier >>> way. >> >> link_to is simply a helper to generate standard HTML links (<a >> href="...">) so any Javascript or CSS techniques you would use with >> HTML can be used with the resulting code. >> >> Have you tried using link_to in a template and looking at the HTML >> that''s produced? (with the ''view source'' option in your browser). >> >> James. > > > I have, and know , it turns into a href, but it seems as if the styling is > lost anyway.Try this: link_to "Link text", { :controller => "c", :action => "a" }, :class => "myclass" You can see it described in several places if you google for: link_to css class. David -- David A. Black | dblack-0o/XNnkTkwhBDgjK7y7TUQ@public.gmane.org Author of "Ruby for Rails" [1] | Ruby/Rails training & consultancy [3] DABlog (DAB''s Weblog) [2] | Co-director, Ruby Central, Inc. [4] [1] http://www.manning.com/black | [3] http://www.rubypowerandlight.com [2] http://dablog.rubypal.com | [4] http://www.rubycentral.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---