I put a black bordered box (the <div>
element whose id is box
) in a flex box (the <body>
element). If I resize the browser to a smaller size, the scroll bar appears, but I can’t use it to see the top border and left border of the box.
Why is that? If I want to view the whole box using the scrollbar, what should I do?
Here is the code:
html, body {
height: 100%;
margin: 0;
padding: 0;
}
body {
align-items: center;
display: flex;
justify-content: center;
}
#box {
border: 10px solid black;
min-height: 700px;
min-width: 700px;
}
<div id="box"></div>