ruk·si

🎨 CSS
Body Border

Updated at 2013-04-28 01:56

Paints inner borders on whole window viewport. Works well if all pages are higher than the window, otherwise side borders do not get drawn to the end.

body:before,
body:after {
    content: "";
    position: fixed;
    background: #990000;
    left: 0;
    right: 0;
    height: 10px;
}
body:before {
    top: 0;
}
body:after {
    bottom: 0;
}

body {
    border-left: 10px solid #990000;
    border-right: 10px solid #990000;
    margin-left: 0;
    margin-right: 0;
    height: 100%;
}