[html] CSS how to make scrollable list

I am trying to create a webpage which is made up of a header and bellow the header a list of items. I want the list of items to be vertically scrollable. I also would like the webpage to take up the entire window but not be bigger. Currently my problem is the list of items is not scrollable and instead extends far below the bottom of the window and this is causing the window to be scrollable. What should the CSS properties be on the html, body, header and list items?

doctype html
html
    head
        link(href="css/style.css" rel="stylesheet")
    body
        div#wrapper
            h1 Interactive Contact Directory
            div(class="tools")
                |Search: 
                br
                input(type="text" id="searchBox")
                select(name="searchBy" id="searchBy")
                    option(value='firstname') First Name
                    option(value='lastname') Last Name
                    option(value='email') Email
                br
                br
            div(id="listingHolder")
                ul(id="listing")
            div(id="listingView")

Bellow is the current style sheet I have

html{
    height: 100%;
}
body {
    background:#121212;
    margin:0px;
    padding:0px;
    font-family:"Open Sans", sans-serif;
    height: 100%;
}
#wrapper {
    max-height: 100%;
}
h1 {
    margin:0px;
    color:#fff;
    padding:20px;
    text-align:center;
    font-weight:100;
}
.tools {
    text-align:center;
    color:#fff;
}
#searchBox {
    padding:7px;
    border:none;
    border-radius:5px;
    font-size:1.2em;
}
a.filter {
    display:inline-block;
    padding:5px 10px;
    margin:5px;
    background:#0472C0;
    color:#fff;
    text-decoration:none;
    border-radius:3px;
}
a.filter:hover {
    background:#0B9DE0;
    color:#fff;
}
ul#listing {
    list-style:none;
    padding:0px;
    margin:0px;
    background:#fff;
    width:100%;
}
ul#listing li {
    list-style:none;
    border-bottom:1px solid #eee;
    display:block;
}
ul#listing li .list-header {
    padding:10px;
    cursor:pointer;
    display:block;
}

ul#listing li .list-header:hover {
    background:#7893AB;
    color:#fff;
}
ul#listing li .list-header.active {
    background:#447BAB;
    color:#fff;
}
ul#listing li .details {
    display:none;
    background:#efefef;
    padding:20px;
    font-size:0.9em;
}
#listingHolder{
    width: 50%;
    overflow: scroll;
}

This question is related to html css pug

The answer is


Another solution would be as below where the list is placed under a drop-down button.

  <button class="btn dropdown-toggle btn-primary btn-sm" data-toggle="dropdown"
    >Markets<span class="caret"></span></button>

    <ul class="dropdown-menu", style="height:40%; overflow:hidden; overflow-y:scroll;">
      {{ form.markets }}
    </ul>

As per your question vertical listing have a scrollbar effect.

CSS / HTML :

_x000D_
_x000D_
nav ul{height:200px; width:18%;}_x000D_
nav ul{overflow:hidden; overflow-y:scroll;}
_x000D_
<!DOCTYPE html>_x000D_
<html>_x000D_
    <head>_x000D_
        <meta charset="utf-8">_x000D_
        <title>JS Bin</title>_x000D_
    </head>_x000D_
    <body>_x000D_
        <header>header area</header>_x000D_
        <nav>_x000D_
            <ul>_x000D_
                <li>Link 1</li>_x000D_
                <li>Link 2</li>_x000D_
                <li>Link 3</li>_x000D_
                <li>Link 4</li>_x000D_
                <li>Link 5</li>_x000D_
                <li>Link 6</li> _x000D_
                <li>Link 7</li> _x000D_
                <li>Link 8</li>_x000D_
                <li>Link 9</li>_x000D_
                <li>Link 10</li>_x000D_
                <li>Link 11</li>_x000D_
                <li>Link 13</li>_x000D_
                <li>Link 13</li>_x000D_
_x000D_
            </ul>_x000D_
        </nav>_x000D_
        _x000D_
        <footer>footer area</footer>_x000D_
    </body>_x000D_
</html>
_x000D_
_x000D_
_x000D_


Examples related to html

Embed ruby within URL : Middleman Blog Please help me convert this script to a simple image slider Generating a list of pages (not posts) without the index file Why there is this "clear" class before footer? Is it possible to change the content HTML5 alert messages? Getting all files in directory with ajax DevTools failed to load SourceMap: Could not load content for chrome-extension How to set width of mat-table column in angular? How to open a link in new tab using angular? ERROR Error: Uncaught (in promise), Cannot match any routes. URL Segment

Examples related to css

need to add a class to an element Using Lato fonts in my css (@font-face) Please help me convert this script to a simple image slider Why there is this "clear" class before footer? How to set width of mat-table column in angular? Center content vertically on Vuetify bootstrap 4 file input doesn't show the file name Bootstrap 4: responsive sidebar menu to top navbar Stylesheet not loaded because of MIME-type Force flex item to span full row width

Examples related to pug

Angular 4: InvalidPipeArgument: '[object Object]' for pipe 'AsyncPipe' Node - how to run app.js? CSS how to make scrollable list Client on Node.js: Uncaught ReferenceError: require is not defined Change value of input placeholder via model? Set value of textbox using JQuery Change the "No file chosen": Error: Failed to lookup view in Express Loop in Jade (currently known as "Pug") template engine How to pass variable from jade template file to a script file?