Confusing error during CSS styling


#1

https://www.codecademy.com/courses/web-beginner-en-TlhFi/4/5?curriculum_id=50579fb998b470000202dc8b

When I insert this code into CSS, I get an error message telling me, "Did you remember to set your link’s [<a href=“yadayada…>Link Text</ a>] text-decoration to none;?” Which, yes, I did. Is there a problem I don’t see?

h1 {
    font-family:Verdana, sans-serif;
    color:#576D94
}
p {
    font-family: Garamond, serif;
    font-size:18px;
    color:#4A4943;
}
img {
    height:100px;
    width:300px;
    border: 1px solid #4682B4
}
a {
    text-decoration:none;
    color:#CC0000;
}

#2

I would recommend to Always use the semi-colon-; at the CSS-end-of-a-rule-definition…

Could you provide us with the FULL HTML-code you are using…


#3

Here is the full HTML

<!DOCTYPE html>
<html>
	<head>
		<title>Result</title>
		<link type="text/css" rel="stylesheet" href="stylesheet.css" />
	</head>
	<body>
	    <h1>
	        Learning to Code
	    </h1>
	    <p>
	        any text you like. <a href="http://www.intrawallpaper.com/static/images/cool-wallpapers26.jpg">Here</a> is a cool picture!
        </p>
        <img src="http://www.intrawallpaper.com/static/images/cool-wallpapers26.jpg" />
	</body>
</html>

Anything else you need?
Also I added all the semicolons that were missing after you mentioned it, but the problem persists.


#4

Maybe you are using chrome ???
Text-decoration: none; bug


#5

That would be the problem, yes. Thanks!
Is there any way around this? Or must I use another browser?


#6

Maybe
using google search
css solution to chromes text-decoration none bug site:stackoverflow.com
found in
https://stackoverflow.com/questions/11419998/text-decoration-none-not-working

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


#7

Okay yeah I followed the link to Stack Overflow. What exactly does the “!important” do to the CSS? how can I use it more often?


#8

You could have used google search
==the Book==
!important site:developer.mozilla.org/en-us/

OR

== discussions / opinions ==
css !important explained site:stackoverflow.com

happy reading :eyeglasses: :israel:


#9

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.