How to add a border on all four sides of a browser page

How to add a border on all four sides of a browser page, no matter which browser, regardless of resolution. Is there such css or javascript code?

+5
source share
3 answers

If you need a frame around the viewport, you can try the following:

<html>
<head>
  <style>
  body {position: fixed; top:0; left: 0; bottom: -5px; right: -5px; 
        border: 5px solid red;}
 </style>
</head>
<body>
</body>
</html>

Depending on what you want, it is even better to use something like the YUI Layout Manager .

+2
source

Write the following lines in your CSS:

body {
  border-width: 5px; /* or what you want */
  border-style: solid;
  border-color: red; /* or what you want */

  /* or use the short form: */
  border: 5px solid red;
}
+2
source
<body style="margin:0px;margin-right:2px;margin-bottom:2px">
<div style="width:100%;height:100%;border:1px solid red;margin-right:-2px;margin-bottom:-2px">
    Stuff here
</div>
</body>

-, , elektronikLexikon, 100%.

: .

EDIT2: jira , ;)

PS. , , . .

0
source

All Articles