Stuck on CSS Tutorial - Lesson 25 of 26


#1

Instructions:
1. Add an image to your HTML document. Its src attribute can point anywhere! (Check the Hint if you're stuck or need a picture.)
2. On the CSS tab, set your image's height to 100px and width to 300px.
3. On the CSS tab, give your image a border of 1px solid #4682b4.

Here is my CSS code for the

img {

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

}

I know for a fact that the html part concerning the image is written correct. And also, I think I have successfully added the border to the image because when I change the px value I can observe the change in the border. But every time I try to submit it says;

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

I have been stuck here for a solid 15 minutes now and I have tried to solve this in every way that I can think of(including refreshing the page multiple times and rewriting the entire code.) Please help!
Thanks in advance.


#2

Please post your HTML code so I can see more into the problem and is it giving off any error, if so what is the error, could you please post it.


#4

Please could you put your code in the formatting as a code.
You can do this by:-

Highlighting your code then selecting the button which looks like this; </>

@stetim94 has a good diagram explaining how to format your code correctly here on the forums.


#5

you mean this image:

You can use the image, just save the image and upload it to a question when needed

@hippiekiyay, make sure your browser zoom is set to 100% (ctrl + 0 ) and that none of the earlier css selectors are missing any closing curly bracket (}), speaking of which, can we see the rest of your css code as well?


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

#7
<!DOCTYPE html>
    <html>
    	<head>
    	<link type="text/css" rel="stylesheet" href="stylesheet.css"/>
    		<title>Result</title>
    	</head>
    	<body>
    	    <h1> Hello world!</h1>
    	    <p>Random Text</p>
    	    <img src="http://bit.ly/NnVbxt"/>
    	</body>
    </html>

#8

I am having the exact same problem


#9

works fine, make sure the zoom is set to 100% (ctrl 0) otherwise you might have hit a glitch, try a different browser.


#10

yes, setting the zoom to 100% fixed it. Thank you for your time. :smile:


#11

Thanks, it was the browser


#12

yes , the web browser zoom to 100%, and it solved the problem.


#13

Thanks for the advice! I've been trying to pass this section about 20 minutes before I've seen you post.


#14

the problam is make sure the zoom is set to 100% (ctrl 0) otherwise you might have hit a glitch, try a different browser. thank you


#15

I'm still unable to get this code to pass. Tried another browser. Zoom is correct. The only thing preventing me from progressing!


#16

#17

well, please make a new topic with your code + error message + question so we can help you. This topic is so old, no need to revive it and give everyone a lot of notifications