Oops, try again. Did you remember to give your div a height of 50px? It looks like it's 50.2px


#1


https://www.codecademy.com/courses/web-beginner-en-UuBLw/0/2?curriculum_id=50579fb998b470000202dc8b


Hello guys, could someone help me, please ?

My code HTML and CSS seems okay, but i keep having this error message :

  • Oops, try again. Did you remember to give your div a height of 50px? It looks like it's 50.2px.

I also have this problem with the lessons :

  • CSS:An Overview > Sizes and borders (problem : img border, 1px solid #4682b4)
  • CSS selectors > One selector to rule them all (problem : 1px border)

**

I'm on Firefox 47.0, and I also tried on Opera 36.Zoom is on 0 with both browsers. I've tried to clean the cache, to refresh the page with ctrl+F5, and to log out / log in / and try again. I even rebooted the computer. Nothing works.

**


<!DOCTYPE html>
<html>
    <head>
        <link type="text/css" rel="stylesheet" href="stylesheet.css"/>
        <title>About Me</title>
    </head>
    <body>
        <img src="https://s3.amazonaws.com/codecademy-blog/assets/46838757.png"/>
        <p>We're Codecademy! We're here to help you learn to code.</p><br/><br/>
        <div>
            
        </div>
    </body>
</html>

Stylesheet.css
img {
    display:block;
    height:100px;
    width:300px;
    margin:auto;
}

p {
    text-align:center;
    font-family:Garamond, serif;
    font-size:18px;
}

/*Start adding your CSS below!*/
div {
    height:50px;
    width:120px;
    border-style:dashed;
    border-width:3px;
    border-color:#6495ED;
    background-color:#BCD2EE;
}


#2

@sunzal,
Here some
== discussions / opinions ==
http://stackoverflow.com/questions/36524272/possible-firefox-font-size-bug-does-not-honor-css-font-size-for-code-tag-wrappe


#3

Hello, and thank for trying to help me ! :slight_smile:

But I've read the stackoverflow answers, and it just speaks about problems with monospace fonts (unless i missed something ?)
Nothing about problems of div size, or border thickness.
I've tried to put their suggestion of
font-family: monospace, monospace;
in my code, but it doesn't help, since there is no monospace font anyway in my webpage.

Moreover, the problem is the same with Opera 36.

Any ideas ?


#4

@sunzal
I use
Windows 10 EDGE
Windows 8.1 IE11
and do not have experience with other Browsers
So sorry !!!

What i do underrstand,
that they are still development now in
Opera beta 39.0.2256.42


#5

Your zoom should be on 100%.

If that doesn't work then you can use an alternate way by working out the difference, if your code shows 50px and error says 50.2px then use 49.98px
__

Next time don't create three of the same topics !


#6

Well, sorry, but I tried to make a single topic on the HTML/CSS category, but it isn't possible. And as it seemed to me to concern 3 different problems... sorry.

Anyway, I found an interesting solution on Firefox 47.0 : The zoom MUST NOT be on 100% ! I found out it was the cause of all my problems !

If you put the zoom on 80%, it will work just fine for every lesson !


#7

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.