come on babay

come on babay,Love me ,love yourself.

2007/05/16

 

最窄770px最宽1024px经典布局

来源:http://www.purecss.cn/article.asp?id=330

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "//www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="//www.w3.org/1999/xhtml">
<head>
<title>最窄770px最宽1024px的经典布局</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<style type="text/css">

* { margin:0; padding:0;}
body { padding:10px 0 0 0; color:#000; background:#fff; text-align:center;}
#wrapper{ width:auto; border:1px solid #000; min-width:770px; max-width:1024px; text-align:left; margin-left:auto; margin-right:auto; position:relative;}

#outer{ margin-left:130px; margin-right:130px; background:silver; border-left:1px solid #000; border-right:1px solid #000; color: #000;}
#header{ position:absolute; top:0; left:0; width:100%; height:70px; line-height:70px; border-bottom:1px solid #000; overflow:hidden; background:#0ff; text-align:center; font-size:xx-large}
#left {
 position:relative;/*ie needs this to show float */
 width:130px;float:left;left:-1px;
 margin-left:-129px;/*must be 1px less than width otherwise won't push footer down */
}
* html #left { margin-right:-3px;}/* 3px jog*/
* html #outer{/* 3px jog*/
 margin-left:127px; margin-right:127px;}
p { margin-bottom:1em; padding:0 5px}

#right {
 position:relative;/*ie needs this to show float */
 width:130px; float:right; left:1px;
 margin-right:-129px;/*must be 1px less than width otherwise won't push footer down */
}

* html #right { margin-right:-130px; margin-left:-3px}/* stop float drop in ie + 3px jog */

#footer { width:100%; clear:both; line-height:50px; border-top:1px solid #000; background:#ffc; color:#000; text-align:center; position:relative;}
#clearheader{ height:72px;}/*needed to make room for header*/
#centrecontent { float:right; width:100%; position:relative;}

html>body #centrecontent { margin:0 -0.5%}/*moz needs this*/
.outerwrap { float:left; width:99%;}
.clearer{ height:1px; overflow:hidden; margin-top:-1px; clear:both;}

/* mac hide\*/
* html #outer, * html #wrapper,* html #centrecontent { height:1%}
/* end hide */

</style>
<!--[if gte IE 5]>
<style type="text/css">
body {width:expression( documentElement.clientWidth < 770 ? (documentElement.clientWidth == 0 ? (body.clientWidth < 770 ? "770" : "auto") : "770px") : "auto" );}
#wrapper {width:expression( documentElement.clientWidth > 1024 ? (documentElement.clientWidth == 0 ? (body.clientWidth >1024 ? "1024" : "auto") : "1024px") : "auto" );}
</style>
<![endif]-->
</head>

<body>
<div id="wrapper">
<div id="outer">

 <div id="clearheader"></div>

 <div class="outerwrap">
 
  <div id="centrecontent">
   <h1>Min width of 770px and max width of 1024px</h1>
   <p>centre content goes here centre content goes here : centre content
     goes here centre content goes here : centre content goes here centre
     content goes here : centre content goes here centre content goes here
     : centre content goes here centre content goes here : centre content
     goes here centre content goes here : centre content goes here centre
     content goes here : centre content goes here centre content goes here
     : centre content goes here centre content goes here : centre content
     goes here centre content goes here : centre content goes here centre
     content goes here : centre content goes here centre content goes here
     : centre content goes here centre content goes here : centre content
     goes here centre content goes here : centre content goes here centre
     content goes here : centre content goes here centre content goes here
     : centre content goes here centre content goes here : centre content
     goes here centre content goes here : centre content goes here centre
     content goes here : centre content goes here content goes here : </p>
  </div>
  
  <div id="left">
   <p>Left content goes here : Left content goes here : Left content goes
   here : Left content goes here : Left content goes here : Left content
   goes goes here : Left content goes here : </p>
  </div>
  
  <div class="clearer"></div>
  
 </div>
 
 <!--end outer wrap -->
 <div id="right">
  <p>Start Right content goes here : Right content goes here : Right content
  goes here : Right content goes here : Right content goes here : Right
  content goes here : Right content goes here : Right content goes here
  : Right content goes here : </p>
 </div>
 
 <div class="clearer"></div>

</div>

<div id="footer">Footer - | - Footer </div>
<div id="header">Header </div>

</div>
</body>
</html>


--
我的网络营销boogger
http://china-news-it.blogspot.com





<< 主页

存档

2007/4/8 - 2007/4/15   2007/4/15 - 2007/4/22   2007/4/22 - 2007/4/29   2007/4/29 - 2007/5/6   2007/5/6 - 2007/5/13   2007/5/13 - 2007/5/20   2007/5/20 - 2007/5/27   2007/5/27 - 2007/6/3   2007/6/3 - 2007/6/10   2007/6/10 - 2007/6/17   2007/6/17 - 2007/6/24   2007/6/24 - 2007/7/1   2007/7/8 - 2007/7/15   2007/12/2 - 2007/12/9   2007/12/9 - 2007/12/16   2007/12/16 - 2007/12/23   2009/10/18 - 2009/10/25   2010/1/10 - 2010/1/17  

This page is powered by Blogger. Isn't yours?

订阅 博文 [Atom]