Effect How to - Put a border around the browser content viewing area








Question

We would like to know how to put a border around the browser content viewing area.

Answer


<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
body {<!--   ww  w  .j a va 2  s.  c  om-->
  border: 2px solid green;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: auto;
}
</style>
</head>
<body>
</body>
</html>

The code above is rendered as follows: