This forum is now read-only. Please use our new forums at discuss.codecademy.com.

CSS: An Overview Forum

View Course » View Exercise

132 points
Beac3e191ce208f1f586ee0b93ec41bc?s=140&d=retro
Submitted by
Jeremy
almost 3 years ago

25/26 problem with border (fixed! :) )

Hey everybody, thanks for all the answers! I still don't know what I did wrong, but I copied and pasted this one guys answer into my code that I swear looked exactly the same, and it fixed it!

I keep getting the error that my border is wrong! I swear I've tried everything! I've reset my screen size with crt+0, I've tried all the voodoo techniques where you move the code to different location, and quadruple checked the links. Here is my HTML: (i removed the <>'s)

!DOCTYPE html
html
head
link type="text/css";rel="stylesheet";href="stylesheet.css"/
titleResult/title
/head
body
h1
Anything you want
/h1
p
text you like
/p
img src="https://openclipart.org/image/2400px/svg_to_png/12985/nicubunu_Banana.png"
/body
/html
and here is my CSS:
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;
}


2 votes

permalink

Try the below code.

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

P{font-family:Garamond,serif;font-size:18px;color:#4A4943;}

img {height:100px;}

img {width:300px;}

img {border:1px solid #4682b4}

240 points
0b171166e7e8ba34098fc1a1e7fd4e32?s=140&d=retro
Submitted by
George G
almost 3 years ago

2 Comments

0b171166e7e8ba34098fc1a1e7fd4e32?s=140&d=retro George G almost 3 years ago

This is the correct coding for 25/26

80a77e4e4066c39b680431005fe90170?s=140&d=retro Sauridex over 2 years ago

This is what worked for me in Chrome.
I tried everything else and nothing worked but this solved it. Nice.


1 vote

permalink

I have the same problem but my link is correct. Also, it's strange as the border of my picture is correctly visible. My code:

!DOCTYPE html
html
head
link type="text/css" rel="stylesheet" href="stylesheet.css" /
title>Result</title
/head
body
h1
sadads
/h1
p
dsdsaas
/p
img src="https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcRo44eETdTKjQCoj9xTgC0zJBZqX6DxQUM2DUYYvLUdtO6zsX-c" /
/body
/html

my css:
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;
}

273 points
210684a6c9bd26b6c096d40e3f77c3ca?s=140&d=retro
Submitted by
kuba1024g
almost 3 years ago

5 Comments

593d545c83696644420003b7_64554016 stetim94 almost 3 years ago

Your code is fine. maybe a little glitch. try a different browser. this will give you a new connection (ignoring cache etc). hope that fixed it

E6042075b4dd898127a14ca87f01e501?s=140&d=retro SnowGuy98 almost 3 years ago

It appears to be an issue with Firefox for me. I just opened up Chrome and it worked fine even though I had the same code/same problems that you were having.

593d545c83696644420003b7_64554016 stetim94 almost 3 years ago

could be a little glitch. they occur from time to time (rarely). in firefox, you can also press ctrl + f5 to refresh page (but overwriting the cache)

500758aa13401000020143c5_481550872 kijbob over 2 years ago

I can confirm this. Code didn't work in Firefox, but exactly the same code did in Chrome.

593d545c83696644420003b7_64554016 stetim94 over 2 years ago

could be a glitch/bug. it can happen. opening a new browser will give you a new connection to codecademy's database, sort of like that rebooting computer solves issues


0 votes

permalink

the problem is in the link to your stylesheet. type, rel and href are all attributes. the link to stylesheet should be:
<link type="text/css" rel="stylesheet" href="stylesheet.css" />

2822 points
593d545c83696644420003b7_64554016
Submitted by
stetim94
almost 3 years ago

2 Comments

Picture Danilo Pura Vida Caruso almost 3 years ago

thanks , i fix whit your answer...

F8a19f1e6abef9b666c3514c542a6d5a?s=140&d=retro hmpf over 2 years ago

i had used this stylesheet yet before, i copied-pasted yours and saw it's been equal ... so it can't be the solution for my problem


0 votes

permalink

It seems to be a problem with firefox. I had the same exact problem. I switched to internet explorer and it worked fine.

1141 points
553536ded3292fbf4000000c_187852429
Submitted by
Kenny
over 2 years ago

1 Comment

593d545c83696644420003b7_64554016 stetim94 over 2 years ago

it is a browser glitch, sometimes the browser send wrong cached data to the codecademy server. while this problem occured in firefox for you, could happen in any browser