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


#1

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)


#2

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)


#3

Hi Fatah4561,

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


#4

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


#5

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


#6

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>


#7

i don't understand what link you mean ?


#8

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


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

#10

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


#11

like this ? :

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

#12

yep, like that. That is the correct syntax


#13

okay, thanks for that


#14

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


#15

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)


#16


#17


#18

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


#19

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


#20

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: