css text-decoration:none; in chrome with <a> inside of <div>

292
June 15, 2017, at 08:18 AM
<body>
    <div>
        <a href="www.facebook.com">Like us on Facebook!</a>
        <a href="www.youtube.com">Check our YT channel!</a>
        <a href="www.codecademy.com">This is our website!</a>
    </div>
</body>

in css:

a:link{
text-decoration:none;
color:#008b45;
}
a:hover{
color:#00ff00;
}
a:visited{
color:#ee9a00;
}

I can't seem to get this fixed in Chrome. I used Opera and Mozilla and it works just fine. I know that I can't use "a" or ol/ul inside of tag like span but it should work inside of . I don't get it at all. And it's not like block element(div) is inside an inline element (a). So this should be working as far as I know. But I'm here because apparently I don't know that much. And sorry if this is a duplicate, but I really don't know how to fix this anymore.

Answer 1

Per https://developer.mozilla.org/en-US/docs/Web/CSS/:link, the :link pseudo-class only affects <a> tags that have not been visited. So if you haven't ever visited those sites, you shouldn't see the underline.

It sounds like the problem is that the styles inside a:link aren't working for you? If that's the case, and you want them to be your default styles, just make that

a {
  text-decoration:none;
  color:#008b45;
}
Rent Charter Buses Company
READ ALSO
Adjust height of div only if child element has class X

Adjust height of div only if child element has class X

How can I adjust the height of the div container, only when the iframe class is my-iframe

372
Text wrapping around icon with spans inside of h3 tag

Text wrapping around icon with spans inside of h3 tag

I am trying to get my text to align so that the text does not wrap around this iconI am having trouble because my icon and my text are inside of an h3 tag and an anchor and I am using spans

228
SVG animation is not working on IE11

SVG animation is not working on IE11

I have a really simple loading animation that works perfectly on Firefox and Chrome, but in IE11 it's not showing the SVG figure

1619
Bootstrap- Page layout Issue in using Bootstrap columns

Bootstrap- Page layout Issue in using Bootstrap columns

I use Bootstrap columns for styling my pageI have 4 main div in my row and I expect them to display in a row but they aren't and also a scroll-bar are inserted in the bottom of the page

324