How to remove the underline displayed by Rails link_to


As you can see by using the verification function, link_to is an a tag

Method 1

Because it is an a tag, at scss

a {
    text-decoration: none;

To specify

Method 2

Add a class to link_to

<%= link_to "Link",path name, class: "link" %>

Specified by scss

.link {
    text-decoration: none;

When it still doesn't disappear

Change the priority with ! important

In the case of method 1

a {
    text-decoration: none !important;

In the case of method 2

.link {
    text-decoration: none !important;

! Important is a last resort, so heavy use is strictly prohibited.

Recommended Posts

How to remove the underline displayed by Rails link_to
[Rails] How to decide the destination by "rails routes"
How to use the link_to method
[Rails] How to display the list of posts by category
[Rails] How to use the map method
[Rails] How to omit the display of the character string of the link_to method
I tried to understand how the rails method "link_to" is defined
How to make the schema of the URL generated by Rails URL helper https
How to add / remove Ruby on Rails columns
How to output CSV created by Rails to S3
How to separate .scss by controller in Rails
How to check Rails commands in the terminal
How to write Rails
How to uninstall Rails
[Rails6] How to connect the posting function generated by Scaffold with the user function generated by devise
How to set the display time to Japan time in Rails
[Rails] How to search by multiple values ​​with LIKE
How to return to the previous screen by Swipe operation
How to move to the details screen by clicking the image
[Ruby on Rails] How to change the column name
[Rails] I don't know how to use the model ...
[Rails] How to change the column name of the table
[Rails] How to get the contents of strong parameters
[Rails] How to display an image in the view
[rails] How to post images
[Rails] How to use enum
[Rails] How to install devise
[Rails] How to use enum
How to read rails routes
How to use rails join
How to terminate rails server
How to write Rails validation
How to write Rails seed
[Rails] How to use validation
[Rails] How to disable turbolinks
Pass parameters to Rails link_to
[Rails] How to use authenticate_user!
[Rails] How to use "kaminari"
[Rails] How to implement scraping
[Rails] How to make seed
How to write Rails routing
[Rails] How to install simple_calendar
[Rails] How to install reCAPTCHA
[Rails] How to use Scope
How to dynamically change the column name acquired by MyBatis
How to connect the strings in the List separated by commas
[With back tricks] How to introduce React to the simplest Rails
[Rails] How to delete images uploaded by carrierwave (using devise)
Let's summarize how to extend the expiration date of Rails
How to run React and Rails on the same server
[Rails] How to display information stored in the database in view
[Rails] How to use gem "devise"
[Rails] How to convert the URI of the image sent by http to https when using Twitter API
How to deploy jQuery on Rails
[Rails] How to install Font Awesome
How to use the include? method
[Rails / Routing] How to refer to the controller in the directory you created
[Rails] How to use devise (Note)
How to use the form_with method
[Rails] How to use flash messages
[Rails] How to get the URL of the transition source and redirect