首页
关于我们
网站建设
经典案例
网络推广
技术中心
建站指导
联系我们
网站套餐 Package
最新推荐 Recommended  
  您现在的位置: 天诚世纪 >> 技术中心 >> 网页设计 >> WEB标准 >> 正文
CSS+DIV设计实例:多个DIV排列时居中
作者:天诚世纪 更新时间:2009-7-14 17:05:41 来源:天诚世纪
    

以下为引用的内容:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
body {text-align:center}
#outer {
 width:60%;
 background:#ffffcc;
 margin:auto;
 text-align:center;
}
.inner {
 width:100px;
 height:100px;
 margin:5px;
 border:1px solid #000;
}
* html .inner {display:inline}/* for ie*/
html>body #outer {display:table}/*for mozilla */
html>body .inner {display:table;float:left}/*for mozilla */
@media all and (min-width: 0px){/* opera 7 styles */
html>body .inner {display:inline-block;float:none;}
}

本文链接:http://www.tc-21.com/ITCenter/200907/20090714170541.html

  • 上一篇文章:
  • 下一篇文章:
  •   更多关于WEB标准的新闻
      相关文章
    DIV与TABLE的区别
    浏览器不能正常解析CSS代码的解决
    HTML与javascript中常用编码浅析
    用CSS3 实现未来的Web
    DIV+CSS网页布局及网站设计常犯错误
    HTML5与HTML4的区别
    CSS布局实例:上中下三行 中间自适应
    CSS常用技巧介绍