惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园_首页
博客园 - 【当耐特】
IT之家
IT之家
M
MIT News - Artificial intelligence
酷 壳 – CoolShell
酷 壳 – CoolShell
Martin Fowler
Martin Fowler
V
Visual Studio Blog
F
Fortinet All Blogs
The Cloudflare Blog
Last Week in AI
Last Week in AI
博客园 - 司徒正美
G
Google Developers Blog
Vercel News
Vercel News
爱范儿
爱范儿
小众软件
小众软件
WordPress大学
WordPress大学
I
InfoQ
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
MongoDB | Blog
MongoDB | Blog
A
About on SuperTechFans
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
C
Check Point Blog
Apple Machine Learning Research
Apple Machine Learning Research
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知

博客园 - 郭大侠

【原创】还有比我这更简单的静态树吗? - 郭大侠 - 博客园 asp.net获得路径的方法 用表格实现简单网站左侧导航 网站设计之asp.net网站多语言版本 vs2005常用快捷键 Repeater显示父子表数据,无闪烁 jquery学习相关 show div and mouse can move on the div js map js+div+css 模拟弹出对话框 送大家一首歌曲,《保卫延安》片尾曲 vs2005调试javascript url重写 总有人问js二级联动问题,给出我写的一个例子 - 郭大侠 - 博客园 oracle横表变竖表问题 中国房地产的实质 北京奥运会赛事电视直播表(绝对完整)--每天就抱着电视看吧! 动物为什么会预知地震,地震后为什么会下雨? 新工资税计算方法及年终奖个税算法
div里面套3个div,居中显示,兼容ie6-8,ff,咋就这么麻烦呢
郭大侠 · 2010-03-25 · via 博客园 - 郭大侠

弄了半天,终于好了,记录下来。

<!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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>三个div水平居中</title>
<style type="text/css">

body 

{ 
    text-align
:center; 
    margin
:0;
}

#div0

{
    border
:solid 1px #000000;
}

#div0

{
    width
:1000px;
    height
:220px;
    text-align
:center;
    margin
:0 auto;
    padding
:0;
}

#div_left,#div_middle,#div_right

{
    margin
:0;
    padding
:0;
    width
:200px;
    height
:200px;
    border
: dotted 1px Red;
    display
:inline-block;
}</style><!--[if lte IE 7]>

<style type="text/css" media="all">
#div_left,#div_middle,#div_right
{
    display:inline;
}
</style>

<![endif]

--></head><body>
<div id="div0">
    
<div id="div_left">div_left</div><div id="div_middle">div_middle</div><div id="div_right">div_right</div>
</div><br /><!--<p>
lte:小于等于
gt:大于
gte:大于等于
</p>
-->
</body></html>