| <!DOCTYPE html> | |
| <style> | |
| .layout-container { | |
| width: 210px; | |
| position: relative; | |
| } | |
| .position-container { | |
| position: relative; | |
| width: 202px; | |
| margin-left: auto; | |
| margin-right: auto; | |
| } | |
| #overflow { | |
| width: 50%; | |
| height: 100px; | |
| overflow: scroll; | |
| position: absolute; | |
| } | |
| .spacer { | |
| background: #0f0; | |
| height: 2000px; | |
| width: 100%; | |
| } | |
| </style> | |
| <body> | |
| <div class="layout-container"> | |
| <div class="position-container"> | |
| <div id="overflow"> | |
| <div class="spacer"> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </body> |