Menata Layout Box
1. Menggunakan Div dan CSS
tambahkan style ini dibawah tag <head> sebelum tag </head>
<style type="text/css">
.box{
width:350px;
position:relative;
padding:6px;
}
.box #btl{
background:url(images/box_top_left.gif) no-repeat top left;
position:absolute;
width:6px;
height:6px;
left:0px;
top:0px;
}
.box #btr{
background:url(images/box_top_right.gif) no-repeat top right;
position:absolute;
width:6px;
height:6px;
right:0px;
top:0px;
}
.box #btc{
background:url(images/box_top_center.gif) repeat-x top left;
position:absolute;
height:6px;
left:6px;
right:6px;
top:0px;
}
.box #bcl{
background:url(images/box_center_left.gif) repeat-y top left;
position:absolute;
width:6px;
top:6px;
bottom:6px;
left:0px;
}
.box #bcr{
background:url(images/box_center_right.gif) repeat-y top right;
position:absolute;
width:6px;
top:6px;
bottom:6px;
right:0px;
}
.box #bbl{
background:url(images/box_bottom_left.gif) no-repeat bottom left;
position:absolute;
width:6px;
height:6px;
left:0px;
bottom:0px;
}
.box #bbr{
background:url(images/box_bottom_right.gif) no-repeat bottom right;
position:absolute;
width:6px;
height:6px;
right:0px;
bottom:0px;
}
.box #bbc{
background:url(images/box_bottom_center.gif) repeat-x bottom left;
position:absolute;
height:6px;
left:6px;
right:6px;
bottom:0px;
}
.box #bcc{
background:url(images/box_bg.gif);
padding:12px;
}
</style>
atau bisa juga begini:
<style type="text/css">
.box{
width:350px; position:relative;
}
.box, .box #bcc{
padding:6px;
}
.box #btl, .box #btr, .box #btc, .box #bcl, .box #bcr, .box #bbl, .box #bbr, .box #bbc{
position:absolute;
}
.box #btl, .box #btr, .box #bcl, .box #bcr, .box #bbl, .box #bbr{
width:6px;
}
.box #btl, .box #btr, .box #btc, .box #bbl, .box #bbr, .box #bbc{
height:6px;
}
.box #btc, .box #bbc{
left:6px;
}
.box #bbc, .box #btc{
right:6px;
}
.box #bcl, .box #bcr{
top:6px; bottom:6px;
}
.box #btl, .box #bcl, .box #bbl{
left:0px;
}
.box #btl, .box #btr, .box #btc{
top:0px;
}
.box #btr, .box #bcr, .box #bbr{
right:0px;
}
.box #bbl, .box #bbr, .box #bbc{
bottom:0px;
}
.box #btl{
background:url(images/box_top_left.gif) no-repeat top left;
}
.box #btr{
background:url(images/box_top_right.gif) no-repeat top right;
}
.box #btc{
background:url(images/box_top_center.gif) repeat-x top left;
}
.box #bcl{
background:url(images/box_center_left.gif) repeat-y top left;
}
.box #bcr{
background:url(images/box_center_right.gif) repeat-y top right;
}
.box #bbl{
background:url(images/box_bottom_left.gif) no-repeat bottom left;
}
.box #bbr{
background:url(images/box_bottom_right.gif) no-repeat bottom right;
}
.box #bbc{
background:url(images/box_bottom_center.gif) repeat-x bottom left;
}
.box #bcc{
background:url(images/box_bg.gif);
}
</style>
tambahkan code ini dibawah tag <body> sebelum tag </body>
<div class="box">
<div id="btl"></div>
<div id="btr"></div>
<div id="btc"></div>
<div id="bcl"></div>
<div id="bcr"></div>
<div id="bbl"></div>
<div id="bbr"></div>
<div id="bbc"></div>
<div id="bcc">
<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhN11KrOt0HOd66slX0EnXa-ibeF2p0Bt8w38bFmrmd_L4bPaetSuLEpEiGGJ9zGu8LRUM7jitlIp8DEIIhzarnKd0CAXka_YRkoFk6EB6i1JM5xyodox16faGYCB5yohESNDLGVHYtfxv5/s1600/adipodayDESIGN.png">
</div>
</div>