Nothing is wrong with this code, correct?


#1

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

I keep getting the error message below but the border is appearing so this is just a glitch with codeacademy right?
Oops, try again. Did you remember to give your image a 1px solid #4682b4 border?


img {
    height: 100px;
    width: 300px;
    border: 1px solid #4682b4;
}


#2

Hi makeo22,

Your code looks fine......try refreshing the browser check once again...


#3

Hello!
Have you tried to reset your browser zoom?

On MAC - press cmd+0
On Windows - press ctrl+0


#4

Make sure that your html is linked to your css as well :slight_smile:


#5

Hello

Same problem for me : I can see my border, but it's not accepted and I can't find my mistake. I tried F5 and to close and re-open the browser, the zoom reset, to add another img {border : 1px solid #4682b4 ;} at the end of the css but it still isn't validated :


Firefox 47.0 for Ubuntu


#6

Are you sure that your index.html is linked to your stylesheet.css?


#7

I'm not sure if this will fix it, but try to remove the spaces in between all of your colons, and the spaces in between all of your semicolons. For example you might have it like this: color : blue ; try removing the spaces so that it's like this: color: blue;

Again, I'm not sure if that will work, but it's worth a try :slight_smile: And if it doesn't work then try what @funct1on suggested and make sure that your html is linked up to your css :slight_smile:


#8

The problem is solved for me, thank you (the link was ok, so I removed the spaces, it still didn't worked, but after F5 it was ok). I thought spaces weren't important in css (exept between numbers and units like px&co) ?

Thanks for all, I hope Makeo22 will be ok too


#9

I'm having the same problem. I've been trying all of the above mentioned ideas. Everything is linked, tried F5, spaces are correct:


#10

Reset your browser zoom?


#11

I tried several times. :frowning: It still comes up with the error code, rewrote it several times, I've tried everything on this forum as well as other forum discussions - about this same problem.


#12

Issue solved --- It only works in IE --- it error codes in Chrome and Firefox


#13

same here HELP me please thank you in advance
ps doesn't work on IE


#14

this is my html

<!DOCTYPE html>
<html>
	<head>
	<link type="text/css" rel="stylesheet" href="stylesheet.css" />
		<title>Result</title>
	</head>
	<body>
	   <h1> go bannanas </h1>
	   <p>like crazy bannanas, or eat them?</p>
	   <img src="http://searchengineland.com/figz/wp-content/seloads/2015/10/google-brain-data1-fade-ss-1920.jpg" />
	</body>
</html>

and css

h1{
font-family: Verdana, sans-serif ;
color: #576d94;
}
p{
font-size: 18px;
color: #4a4943;
font-family: Garamond, serif;
}
img src{
height: 100px;
width: 300px;
border: 1px solid #4682b4;
}


#15

just need to remove "src" from your css -- hope this helps


#16

that is what I did but thank you took me a while to figure that out


#17

sorry but help again its on shaping your button 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>
			
		</div>
	</body>
</html>

and 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: 120px;
border-color: #6495ed;
background-color: #bcd2ee;
border-style: dashed 6px
border-radius: 5px;
}


#18

error code:

Oops, try again. Did you remember to set your div's border-radius to 5px?


#19

nvm just had to add a semi-colon


#20

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