vue-router : how to remove underline from router-link

rpivovar picture rpivovar · Jun 28, 2017 · Viewed 33.1k times · Source

This results in an underlined link:

<li><router-link to="/hello">Hello</router-link></li>

My understanding is that the router-link element generates an a tag.

I've tried these things in the CSS:

router-link{
    text-decoration: none;
}

router-link a{
    text-decoration: none;
}

router-link a{
    text-decoration: none !important;
}

..but unfortunately none of these work.

Answer

Emma Earl Kent picture Emma Earl Kent · Jun 28, 2017

You can try targeting the list item link like this:

li a {
    text-decoration: none;
}