Hello
centered width 768px
Code:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>12345 12345 12345 12345 12345</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
/* \*/
html,body{height:100%;}
/* */
*{padding:0;margin:0;}
body{background:#F2FCFF;overflow:hidden;}
* html body{margin:77px 0 41px 0;text-align:center;}
#top,#bottom{left:0;width:100%;}
#top{top:0;height:77px;}
#bottom{bottom:0;height:41px;}
* html #top,* html #bottom{position:absolute;}
html>body #top, html>body #bottom {position:fixed;}
#content{overflow:auto;width:100%;/*left:50%;margin-left:-384px;*/}
* html #content{height:100%;position:relative;}
html>body #content,html>body .x{
position:fixed;
top:77px;
bottom:41px;
}
#content p{padding:15px;}
.x{background:#f2fcff url(images/bgd_slice.jpg) repeat-x;}
* html .x{background:#f2fcff url(images/bgd_slice.jpg) fixed repeat-x;}
.bgdimage{background:#f2fcff url(images/header.gif) center repeat-x;height:77px;}
.footerimage{background:#f2fcff url(images/footer.gif) center repeat-x;height:41px;}
.x{height:100%;width:100%;}
.y{width:768px;margin:0 auto;text-align:left;}
</style>
<!--[if IE]>
<style type="text/css">
*+html{height:99%;}
*+html .x{background: #f2fcff url(images/bgd_slice.jpg) fixed repeat-x 0 77px;}
</style>
<![endif]-->
</head>
<body>
<div id="top">
<div class="bgdimage"></div>
</div>
<div class="x">
<div id="content">
<div class="y">
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here xxxx</p>
</div>
</div>
</div>
<div id="bottom">
<div class="footerimage"></div>
</div>
</body>
</html>
With a minimum of containers
Code:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>12345 12345 12345 12345 12345</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
/* \*/
html,body{height:100%;}
/* */
*{padding:0;margin:0;}
body{background:#f2fcff;overflow:hidden;}
* html body{margin:77px 0 41px 0;text-align:center;}
#top,#bottom{left:0;width:100%;}
#top{top:0;height:77px;background: url(images/header.gif) center repeat-x;}
#bottom{bottom:0;height:41px;background: url(images/footer.gif) center repeat-x;}
* html #top,* html #bottom{position:absolute;}
html>body #top, html>body #bottom {position:fixed;}
#wrap{overflow:auto;width:100%;}
* html #wrap{height:100%;}
html>body #wrap{
position:fixed;
top:77px;
bottom:41px;
}
#wrap p{padding:15px;}
#wrap{background: url(images/bgd_slice.jpg) repeat-x;}
* html #wrap{background: url(images/bgd_slice.jpg) fixed repeat-x;}
.content{width:768px;margin:0 auto;text-align:left;}
</style>
<!--[if IE]>
<style type="text/css">
*+html{height:99%;}
*+html #wrap{background: #f2fcff url(images/bgd_slice.jpg) fixed repeat-x 0 77px;}
*+html{overflow:auto;}
</style>
<![endif]-->
</head>
<body>
<div id="top"> </div>
<div id="wrap">
<div class="content">
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>wrap to go in here xxxx</p>
</div>
</div>
<div id="bottom"> </div>
</body>
</html>
class only
HTML Code:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>12345 12345 12345 12345 12345</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
*{padding:0;margin:0;}
body{overflow:hidden;background:#f2fcff url(images/bgd_slice.jpg) repeat-x 0 77px;}
* html body{margin:77px 0 41px 0;text-align:center;}
* html .a{position:absolute;}
head+body .f{position:fixed;}
.a{left:0;width:100%;}
.he{top:0;height:77px;background: url(images/header.gif) center repeat-x;}
.fo{bottom:0;height:41px;background: url(images/footer.gif) center repeat-x;}
.wra{overflow:auto;width:100%;}
* html .wra{height:100%;}
head+body .wra{
top:77px;
bottom:41px;
}
.wra p{padding:15px;}
.content{width:768px;margin:0 auto;text-align:left;}
</style>
<!--[if IE]>
<style type="text/css">
*+html{overflow:auto;}
</style>
<![endif]-->
</head>
<body>
<div class="he a f"> </div>
<div class="wra f">
<div class="content">
<p>content to go in here start</p>
<!-- -->
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>content to go in here</p>
<p>wrap to go in here end</p>
</div>
</div>
<div class="fo a f"> </div>
</body>
</html>
Bookmarks