I'm thinking there's a problem in my code


#1

Hi,

I'm stuck in the same place.
I tried to change browsers as advised before and it did work in a previous course but now on this one, so I'm thinking it's my code.

here's my 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://theworkoutprincess.com/">visit our website at <span>TheWorkoutPrincess.com</span></a>
		</div>
	</body>
</html>

and here's my 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: 180px;
    border-color: #6495ED;
    background-color: #bcd2ee;
    border-style: solid;
    border-width: 2px;
    border-radius: 5px;
    margin: auto;
    text-align: center;
    text-decoration: none;
    color: red;
    font-family: Arial Bold;
    }
    
span {
    color: Blue;
    font-family: Impact;
    }

Thanks


Change the link's text-decoration to none
#2

Your post contains spam. Please do not use these courses to promote your favorite sites. Use common, well known sites that serve a purpose, such as codecademy.com or google.com, etc.

Posting a question with no link to the exercise is the sure way to not get the help you need and want. We can search all day and never find the exact lesson. Your link will be invaluable to anybody who wants to help.


I can think of no reason to declare this rule for a DIV. By default it has no text decoration. LINKS have underline by default.


#3

Ohh I'm sorry, I had no intention in promoting any website. I'll make sure next time to change my code to google or code academy before I attach it as a question.

About the link I didn't quite understand what you meant. Should I mention the lesson number?


#4

In the title, maybe, in the post, no. The link is what we need to speed up assistance and make sure we all have the same bearings. The only way we can get to the lesson is through our own dashboard, then we have to find the exercise, hoping we're even in the right unit. Fifteen minutes of our life that we never get back, and then discover that someone's incorrect solution is already accepted. Sorry, tired of going there. Include the link and we can get to the bottom of it, right off. Help will be on its way...


#5

So I was referring to lesson number "5 Adding the link" in CSS "Design a button for your website"
Here is the 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="codeacademy.com">to visit our website<span>click here</span></a>
		</div>
	</body>
</html>

And here is the CSS again:

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

p {
	text-align: center;
	font-family: Garamond, serif;
	font-size: 18px;
}

div {
    Height: 50px;
    width: 150px;
    border-color: #6495ED;
    background-color: #bcd2ee;
    border-style: solid;
    border-width: 2px;
    border-radius: 5px;
    margin: auto;
    text-align: center;
    text-decoration: none;
   
    color: red;
    font-family: Arial Bold;
    }
    
span {
    color: black;
    font-family: Impact;
    }

Thanks


#6

Please post a link to the exercise. Thanks.


#7

https://www.codecademy.com/pt/courses/web-beginner-en-UuBLw/0/5?curriculum_id=50579fb998b470000202dc8b


#8

Your style sheet does not appear to have a style rule for a.


#9

I added the A but it’s still not working.

What am I doing wrong?

Here’s the link:


#10

What error message(s) are you getting?


#11

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