25.Size and borders (my img syntax isn't working)

I’ve changed the height width and border but it doesn’t affected the image in the page, but i am very sure nothing wrong with the code or syntax, and when i click “save&submit code” i got a message “Oops, try again. Did you remember to give your image a 1px solid #4682b4 border?” (but i type it correctly)

i am using google chrome and my zoom is at 100% and i have tried using IE but it doesn’t worked
(sorry for my bad tenses)

Hi Fatah4561,

You need a space between the border style (solid), and the color (#4682b4) :slight_smile:

i still got the message “Oops, try again. Did you remember to give your image a 1px solid #4682b4 border?” and the border doesn’t appear in the image
my syntax:
img {
height: 100px;
width: 300px;
border:1px solid #4682b4;

At last!! it worked [i hit the button “reset code”] :smile:

i know it is solved, but in the first screenshot it looks like non of the styling is applied, indicating something might have been wrong with you <link>

i don’t understand what link you mean ?

the <link> to your stylesheet (href, rel, type) in html, connecting the html and css file

<link type="text/css"; rel="stylesheet"; href="stylesheet.css">

attributes (type, rel, href) are separated by spaces only, no semi-colons. If you where to have only a semi-colon and no spaces between the attributes, the link to stylesheet will not wok

like this ? :

<link type="text/css" rel="stylesheet" href="stylesheet.css">

yep, like that. That is the correct syntax

okay, thanks for that

I am having this exact same issue. My < link > is exactly as it should be as is my syntax in the CSS file. So frustrating! I have tried resetting my code and different images but it will not let me progress. The most frustrating thing is that I know that I am doing nothing incorrect

Okay, can you post your html + css code? So i can check it. Yes, i know you say it is correct, but i would like to see for myself. Is your browser zoom 100%? (ctrl + 0 or cmd + 0 for mac)

i spot a missing semi-colon after width: 300px in your img css selector

Oh dear… how embarrassing. Thank you stetim94! I have been on here since 8am this morning perhaps I should take a break if I can’t spot a missing semi-colon. Again, thank you, much appreciated

that is what the forums is for, i do recommend a break, where did you start this morning (which exercise?), that is just curiosity. We all had these moments, the easiest mistakes are sometimes the hardest to fix. I once spend half hour to a hour to debug a simple do while loop. oops :stuck_out_tongue: