javascript - 2 divs offset because of scrollbar -


issue #1

trying make 2 divs align eachother,

the fist div doesnt have scrollbar, second has one. scrollbar cause second div offset first one.

is there way align 2 divs?

issue #2

why second div not scrolling when has overflow-y:scroll; ?


body, html {     margin: 0;     padding: 0;     border: 0;     outline: 0;     overflow:hidden; } .fixed-top-container {     text-align:center;     top:0px;     height:100px;     min-height:100px;     max-height:100px;     width:100%;     display:inline-block;     margin:0 auto;     padding:0;     background-color:rgba(0, 0, 0, 0.5); } .container {     width:100%;     height:100%;     background-color:#f0f0f0;     overflow-y:scroll; } .content {     width: 800px;     height:100%;     margin:0 auto;     background-color:#ffffff; } 

view jsfiddle issue: http://jsfiddle.net/aaeijh/qah9g/1/

how can bottom div scroll?

use user friendly <textarea> instead of old <div> technique

<textarea rows="10" cols="50" class="container"> //your text here  </textarea> 

jsfiddle


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -