I’ve just made this test page as I’m creating a mobile sliding menu:

```
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title></title>
<style type="text/css">
html,
body { height: 100%; }
body { margin: 0; }
div {
position: fixed;
padding: 20px;
border: 1px solid red;
background-color: #EEEEEE;
left: 0;
height: 100%;
width: 200px;
overflow: scroll;
}
span {
display: block;
margin-left: 242px;
overflow-x: hidden;
}
</style>
</head>
<body>
<div>
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
</div>
<span>
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
x<br />
</span>
</body>
</html>
```

It seems if you add padding and a border to a 100% height position fixed element, the height doesn’t exceed the viewport height. It’s kind of a box-sizing hybrid as it does add padding and border to the width. This is great as it does what I want but just wanted to check: is that behaviour standard (i.e. part of the spec) throughout most browsers? I’ve tested on Safari, Chrome and FF and all seems good.

EDIT: It all works other than you can’t see the bottom border unless you add box-sizing: border-box;