0

Thanks for your time!

I had a code :

<link href="/stylesheets/show.css" media="screen" rel="stylesheet" type="text/css">

<div id="body-container">
        <div id="left-column">
                <ul id="report-list">
                        <% for report in @reports %>
                            <li><%= link_to( report, {:controller => 'loadreport',
                                                      :action => 'get_report_content',
                                                      :test_name => report} )%></li>
                        <% end %>
                </ul>
        </div>
        <div id="right-column">

    </div>
</div>

The link_to method will generate html tags like this :

<a href="/loadreport/get_report_content?name=Test1">Test1</a>

I want to make some decoration on tag a. So in CSS file, I got this codes :

a:link { text-decoration: none;}

a:hover {text-decoration-color: #adff2f;}

It failed to add these decorations to tag a. I think it because tag a is generated by rails link_to method. We don't have tag a ahead of time. Am I right? Then how can I achieve this?

Mathieu Mahé
  • 2,647
  • 3
  • 35
  • 50
mCY
  • 2,731
  • 7
  • 25
  • 43

1 Answers1

5

Can you try this:

a { text-decoration: none; }
a:hover { color: #adff2f; }
Thanh
  • 8,219
  • 5
  • 33
  • 56
  • Thanks for your answer. It works. I've just found out I put the CSS code in the wrong CSS file. So my hypothesis is totally wrong. – mCY Nov 02 '12 at 09:32