Hello,
I just wanted to make a div that shows 5px from each edge of the browser. I mean left, right, top and the bottom. The only edge I still working on is the bottom. Any idea is welcome. It’s just a thing of my website that will be like a finishing touch of my website. I already try to find for a couple of days for this solution. Thank you very much.
However you will need to control the overflow as all content will need to be within that element and can’t go below the fold. It doesn’t sound as though you have thought this through
If you want the bottom border to stretch with content then you would need something more complicated like this.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Transparent shadow border on 100% high layout</title>
<style type="text/css">
/*Opera and IE sticky footer Fix*/
body:before {
content:"";
height:100%;
float:left;
width:0;
margin-top:-32767px;/* negate effect of float*/
}
#outer:after {/* instead of using display table for ie8*/
clear:both;
display:block;
height:1%;
content:" ";
}
html, body {
margin:0;
padding:0;
height:100%;
}
h1, p {margin:0 0 1em}
body {background:#fff;}
#outer {
margin:-7px 5px 0;
min-height:100%;
position:relative;
z-index:1;
clear:both;
border:1px solid #000;
background:#fff;
}
* html #outer {height:100%;}
#top {
height:12px;
border-bottom:1px solid #000;
overflow:hidden;
margin:0 -1px;
position:relative;
background:#fff;
}
#main {
padding:1px 20px;
zoom:1.0;
}
</style>
</head>
<body>
<div id="outer">
<div id="top"></div>
<div id="main">
<p>testing</p>
<p>testing</p>
<p>testing</p>
<p>testing</p>
<p>testing</p>
<p>testing</p>
<p>testing</p>
<p>testing</p>
</div>
</div>
</body>
</html>