Hassan Schroeder wrote: > On Sat, Apr 25, 2009 at 7:00 AM, Jay Pangmi > <[email protected]> wrote: > >> How can I change the color of the link as the >> mouse is rolled over it? Also, change the color of the active link and >> visited link > > <http://www.w3.org/TR/CSS21/> > > HTH, > -- > Hassan Schroeder ------------------------ [email protected]
Thanks for the reply Hassan, I went to the site and did the following: sth.html.erb ================================================================================== <div id="side"> <a href = "http://www....." class = "side-link">Home</a><br /> <%= link_to "Products", :action => "show_products", :class => "side-link" %><br /> </div> ================================================================================== 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 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 [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 -~----------~----~----~----~------~----~------~--~---

