Ruby on Rails Wednesday, February 29, 2012

Well a link_to creates a regular link in HTML so you need to style the a tag.


 #table-3 th a {
color: .....
}

Or if you want to style both regular text and links in that part:

 #table-3 th,
 #table-3 th a {
color: ...
}


Den onsdagen den 29:e februari 2012 kl. 19:16:51 UTC+1 skrev Ruby-Forum.com User:
I have a section of link to button's in my index that have associated
CSS which has a black background. Despite me in the css specifying the
text to be the color white it is staying just plain black.

How would I go about applying my own color to a link_to.

My index section is as followed:

 <div id="table-3">
   <table width="1160">
   <thead>
       <th><%= link_to 'Playstation 3', games_path(:console =>
'Playstation 3')%></th>
            .............................
   </thead>
   </table>
 </div>
and a section of my css

 #table-3 th {
font-size: 12px;
font-weight: normal;
color: #FFFFFF;
line-height: 40px;
margin-bottom: 10px;
font-weight: normal;
text-align: center;

  }
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 view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/AJRRRKsKhMYJ.
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.

No comments:

Post a Comment