Lesson 25: Size and borders


#1

I tired posting in one of the other threads about this topic, but my code would not paste properly.
I have been stuck on this lesson for two weeks. I am on the exercise where I add a border (1px) border style (solid) and border color (#4682b4) but it keeps given me the error message:

Oops, try again.
Did you remember to give your image a 1px solid #4682b4 border?

I have tried two different syntax to this problem. My code has been put into " " to show what I wrote. They are NOT part of my code. And yes, browser has been set to 100%

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

I also tried

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

Any ideas? This quiz seems to be a common stumbling point for many people on this site.


#2

Can we see your full css code? Make sure you forgot no closing curly brackets somewhere. And html would also be really nice (so i can check link to stylesheet)

zoom is 100% is good


#5

if you edit/update your question, leave a reply so i get a notification. Your html code is not visible, take the following steps to make your code visible:

select your code and press ctrl + k (or cmd + k if you use a mac)

if this instructions are unclear, you can also insert 3 backticks before and after your code, like so:

```
<p>visible</p>
```

the backtick is located above the tab key on your keyboard


#8

facing the sam problem. Somebody pls help..


#9

I am asking lostprofit for his code so i can help him. If you want me to help you, please post your html + css code


#10

index.html

DOCTYPE html>
<html>
	<head>
	<link type="text/css" rel="stylesheet" href="stylesheet.css"/>
		<title>Result</title>
	</head>
	<body>
	<h1>
	yeah
	</h1>
	<p> ok</p>
	<img src="http://p1.pichost.me/i/42/1657715.jpg"/>

	</body>
</html>

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}


#12

@lostprofit @micropro18637 :grin: place your code, in the code tags:

  [code]
    //your code goes in here
  [/code]

#13

<!DOCTYPE html>
<html>
	<head>
	<link type="text/css" rel="stylesheet" href="stylesheet.css"/>
		<title>Result</title>
	</head>
	<body>
	<h1>
	yeah
	</h1>
	<p> ok</p>
	<img src="http://p1.pichost.me/i/42/1657715.jpg"/>
    </body>
</html>

#14

Your code is fine, what error message do you receive?

Make sure your browser zoom is set to 100% (ctrl + 0 or cmd + 0 for mac)


#15

it gives error
Oops, try again.
Did you remember to give your image a 1px solid #4682b4 border?


#16

Is your browser zoom 100%? If it is, and is still not working, try a different browser, it could be your browser send cached data


#17

@micropro18637,

The lessons instructions,

  1. Add an image to your HTML document. Its src attribute can point anywhere!

  2. On the CSS tab, set your image's height to 100px and width to 300px.

  1. On the CSS tab, give your image a border of 1px solid #4682b4.

You have completed the first instruction correctly

maybe it has something to do with your css code?

check if it matches this:

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

#18

Thank you :smile: Problem solved..


#19

@rubylearner03, from the guidelines:
We do not tolerate cheating!

Please do not just post answers, or ask for them. Some people may help you by posting some code or showing you errors, but cheating is not tolerated. If we see anybody cheating we will delete the post

Your answer comes dangerously close to this, i didn't flag it, but i will ask you to keep this in mind next time, thank you very much. Happy coding!

@micropro18637, good to hear the issue is resolved. As you might have seen, i made your html code visible, if you edit the answer, you will see i inserted 3 backticks, might be a useful trick if you need to post code again. Good luck with the rest of the course!


#20

@stetim94 @zystvan, thanks for the info. :smile: but make sure you tell everyone if you have the chance or time for that.

the codecademy guide, stated that we should NOT cheat. If you look at the 7th comment on this post you can see that MY reply is just the CSS segment of that comment. I only reorderd it, so that the user who posted it can check if that matches his code. (Incase if any small changes were made to it that might of caused the error.)

If you think this is flaggable material, then you should take the next necessary steps.

Have a good day, and happing coding to you to.


#21

My apologizes in that case, i hadn't noticed it was a re-arrangement of the 7th comment (with the addition of a semi-colon).

In that case it is absolute not flagable material.


#22

I am also having trouble moving on from this lesson. My Chrome browser's zoom is at 100% and when I tried to test the same lesson in my Firefox browser, codeacademy.com says that my browser isn't up to date (but it is). My internet connection is solid and I've cleared my cached date and browsing history. I have taken a screenshot of my CSS code (it looks correct to me), hopefully a fresh pair of eyes can spot the mistake or help me move on. Thank you in advance :blush:


#23

Can i see your html code? It looks to me your <link> to stylesheet is broken.

Please post your code, do not use a screenshot.


#24

Apologies for the late reply. Every other time I posted the code it wasn't visible and I got really frustrated with the process. Rubylearner03 suggested the code tag and it seems to have worked (huzzah!) so posting again.

To answer other questions, I keep getting the message 'Oops, try again. Did you remember to give your image a 1px solid #4682b4 border'?

You can see from the code I have. I also but the image code on one single line as well, like this

border:1px solid #4682b4;

like other people here but the error message was the same.

Zoom is set to 100% and I get this error on different browsers. Any help would be greatly appreciated.

(again, sorry for long delay in replying. Christmas = busy)

<!DOCTYPE html>
<html>
	<head>
		<title>Result</title>
		<link type="text/css" rel="stylesheet" href="stylesheet.css"/>
	</head>
	<body>
	<h1> Heading One </h1>
	<p>Paragraph One</p>
	<img src="http://imgs.xkcd.com/comics/red_car.png" />
	</body>
</html>

h1 {
font-family: Verdana, sans-serif;
color: #576d94;
}

p {
font-size: 18px;
color: #4a4943;
font-family: Garamond, Serif;
}

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


#25

Code is fine, maybe a glitch, try a different browser