css - The div with id 'intro' should be hidden but it shows. What has gone wrong? -


the div id="intro" supposed hidden shows. main container, div "id=myquiz", has width , height 650px , 'overflow' set 'hidden'. now, if div "class=intro" has margin 660px left, should hidden because it's margin higher maximum width of main container. code follows:

    <!doctype html>     <html>     <head>     <meta http-equiv="content-type" content="text/html; charset=utf-8">     <title>test knowledge: saturn</title>     <meta name="viewport" content="width=device-width, initial-scale=1">     <link rel="stylesheet" type="text/css" href="css/quiz.css">     </head>     <body>     <div id="myquiz">      <h1>test knowledge:<span>saturn</span></h1>     <div class="progress"></div>     <div class="intro"></div>      <h2>welcome</h2>     <p>click begin test knowledge of saturn</p>     <p class="btn">begin</p>     <div class="question"></div>     <div class="results"></div>      </div>      </body>      </html> 

css code follows:

    @import url(http://fonts.googleapis.com/css?                      family=titillium+web:900|roboto:400,100);     body { background-color: #fff; padding: 20px; }     #myquiz {  font-family: 'roboto', sans-serif; font-size: 16px; font-weight: 400;  width: 650px; height: 650px;  position: relative;  overflow: hidden;  color: #fff;  background: #000 url(../images/background.jpg) no-repeat 0px 0px; } #myquiz h2 { font-size: 3em; margin: 0px; font-weight: 100;} #myquiz h3 { font-size: 2.4em; margin: 0px; font-weight: 100;} #myquiz p { margin: 0px 0px 40px 0px;} #myquiz .btn { display: inline-block; cursor: pointer; background-color: #c04b01; color: #fff; text-decoration: none; padding: 5px 15px; border-radius: 6px; }  #myquiz .intro { position: absolute; top:225px; left: 660px; width: 550px;} #myquiz .intro p { margin: 0px 0px 40px 0px; } 

here link code on jsfiddle.net:

https://jsfiddle.net/h02y8usu/

you should hide <div class="intro"> adding display: none property .intro


Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -