I am trying to make div elements containing short text strings appear (using JS) in the middle of a blank page, with new elements always centered and older elements moving upwards (similar to what a console or terminal session would look like). Elements that disappear at the top of the page should be viewed by scrolling upwards (i.e. back in time).
The following code works but scroll bars don't appear. Why is that?
HTML
#wordlist {
position: fixed;
overflow: scroll;
margin: 0 auto;
bottom: 50%;
left: 40%;
text-align: left;
}
.word {
// Just font and color
}
<body>
<div id="wordlist">
<div class="word">whatever</div>
<div class="word">whatever</div>
<div class="word">whatever</div>
<div class="word" id="current">whatever</div>
</div>
</body>