A simple solution is to use the color
and border
properties, instead of text-decoration
. You need to set text-decoration: none
first, and then use border-bottom
as the underline for all your links.
style.css
a, a:link, a:visited
{
color: #11bad3;
text-decoration: none;
border-bottom: 1px solid #11bad3;
}
a:hover, a:active
{
background: #00a9c2;
border-color: #00a9c2;
color: #fff;
}
print.css
a, a:link, a:visited
{
border-bottom: 0px;
}
index.html
<link rel="stylesheet" href="assets/css/style.css" type="text/css" media="all">
<link rel="stylesheet" href="assets/css/print.css" type="text/css" media="print">