5. Adding the link


#1

It seems that the platform have some problem with the text-decoration. I'm sure that the code is right...but I received the same error message : Oops, try again. Did you remember to set your link's text-decoration to none;?

This is my code:

img {
display: block;
height: 100px;
width: 300px;
margin: auto;
}

p {
text-align: center;
font-family: Garamond, serif;
font-size: 18px;
}
div{
height:50px;
width:120px;
border-color:#6495ED;
background-color:#BCD2EE;
border-radius:5px;
margin:auto;
text-align:center;
a{
text-decoration:none;
color:red;
font-family:arial;
}

P.s: I tried all the browsers (chrome,firefox,Internet explorer,safary etc...)


#2

missing } to close div css selector


#3

ohh yes, I put the "}" but still the same error : Oops, try again. Did you remember to set your link's text-decoration to none;?


#4

can i see your full thml and css code?


#5

stylesheet.CSS

img {
	display: block;
	height: 100px;
	width: 300px;
	margin: auto;
}

p {
	text-align: center;
	font-family: Garamond, serif;
	font-size: 18px;
}
div{
    height:50px;
    width:120px;
    border-color:#6495ED;
    background-color:#BCD2EE;
    border-radius:5px;
    margin:auto;
    text-align:center;
}
a{
    text-decoration:none;
    color:red;
    font-family:arial;
}

index.html

<!DOCTYPE html>
<html>
	<head>
		<link type="text/css" rel="stylesheet" href="stylesheet.css"/>
		<title>About Me</title>
	</head>
	<body>
		<img src="https://s3.amazonaws.com/codecademy-blog/assets/46838757.png"/>
		<p>We're Codecademy! We're here to help you learn to code.</p><br/><br/>
		<div>
		<a href="https://www.w3schools.com/css/css3_borders.asp">
		After that
		</a>	
		</div>
	</body>
</html>

#6

your code is fine now


#7

yes, but it still not working...


#8

still not if you try a different browser?


#9

I tried with all of them...mozila,chrome,interner explorer,safary...


#10

phuu :slight_smile: it's ok now :slight_smile: thank you

Can you help me with a different one?

At the section : 26. Links and text decoration

I had this problem :

stylesheet.css

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;
}

index.html

<!DOCTYPE html>
<html>
	<head>
		<title>Result</title>
	</head>
	<body>
	<a href="https://www.spreadshirt.ie/smile+t-shirts">
	<img src="https://www.spreadshirt.ie/smiley+smile-A15888011"/>
	</a>
	</body>
</html>

please help me with this, I receive the message : Oops, try again. Did you remember to set your link's text-decoration to none;?


#11

your link to stylesheet is missing alltogether?


#12

Like in the last lesson, the program fails to recognize "text-decoration: none;"

There seems to be a leap in the replies in this thread explaining exactly what made it work.


#13

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