On Apr 26, 7:01 am, Jay Pangmi <[email protected]> wrote: > Hassan Schroeder wrote: > > On Sat, Apr 25, 2009 at 7:00 AM, Jay Pangmi > > <[email protected]> wrote: >
> =========================================================================== > ======= > <div id="side"> > <a href = "http://www....." class = "side-link">Home</a><br /> > <%= link_to "Products", :action => "show_products", :class => > "side-link" %><br /> > </div> If you check the generated HTML you'll see that you call to link_to doesn't actually create a link with class side-link: it creates a link whose URL contains ?class=side-link. It's the old "HTML options need to be in a separate options hash" thing. Fred > =========================================================================== > ======= > > sth.css > =========================================================================== > ======= > #side a.side-link:link { > color: black; > > } > > #side a.side-link:visited { > color: yellow; > > } > > #side a.side-link:hover { > color: white; > > } > > #side a.side-link:active { > color: green;} > > =========================================================================== > ======= > > Now the problem is, it is only working in the link produced by <a > href=......></a> and not in the link produced by <%=link_to "....%>. > Also I wanted to get rid of the black box around the link as it gets > focus, but couldn't. For this I tried #side a.side-link:focus > {background: none;} but didn't help. So, any help will be greately > appriciated. Thanks > -- > 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

