网页布局DIV+CSS,在IE中能显示居中的,在火狐上不能显示居中,偏右怎么解决??
index.html<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/...
index.html
<!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>首页</title>
<link href="css/css.css" rel="stylesheet" type="text/css" />
</head>
<body>
123456
<div id="container"><!--页面层容器-->
<div id="header"><!--页面头部-->
<div id="menu"><!--菜单-->
<ul id="menuList">
<li class="menuHome"><a href="#">首页</a></li>
<li class="menuDiv"></li><!--分隔竖-->
<li class="menuCon"><a href="#">公司简介</a></li>
<li class="menuDiv"></li>
<li class="menuCon"><a href="#">最新信息</a></li>
<li class="menuDiv"></li>
<li class="menuCon"><a href="#">产品展示</a></li>
<li class="menuDiv"></li>
<li class="menuCon"><a href="#">人才招聘</a></li>
<li class="menuDiv"></li>
<li class="menuCon"><a href="#">客服中心</a></li>
<li class="menuDiv"></li>
<li class="menuCon"><a href="#">联系我们</a></li>
<li class="menuDiv"></li>
<li class="menuSea">
<div class="textSea">
<form onsubmit="">
<input type="text" id="search" name="search" value="搜索"
onmouseover=this.focus();this.select();
onclick="if(value==defaultValue){value='';this.style.color='#999'}"
onBlur="if(!value){value=defaultValue;this.style.color='#999'}" />
</form>
</div>
</li>
</ul>
</div>
<div id="banner"><!--banner板块-->
</div>
</div>
<div id="main"><!--页面主体-->
<div id="sidebar"><!--侧栏-->
<div id="sidebar1"><!--侧栏1-->
<div class="sideTitle">
<div class="sideTitleLeft"></div>
<div class="sideTitleCenter"></div>
<div class="sideTitleRight"></div>
</div>
<div class="sideContent">
</div>
</div>
<div id="sidebar2"><!--侧栏2-->
<div class="sideTitle">
<div class="sideTitleLeft"></div>
<div class="sideTitleCenter"></div>
<div class="sideTitleRight"></div>
</div>
<div class="sideContent">
</div>
</div>
</div>
<div id="content"><!--页面内容-->
<div class="conTitle">
<div class="conTitleLeft"></div>
<div class="conTitleCenter"></div>
<div class="conTitleRight"></div>
</div>
<div class="conContent">
</div>
</div>
</div>
<div id="footer"><!--页面底部-->
</div>
</div>
</body>
</html> 展开
<!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>首页</title>
<link href="css/css.css" rel="stylesheet" type="text/css" />
</head>
<body>
123456
<div id="container"><!--页面层容器-->
<div id="header"><!--页面头部-->
<div id="menu"><!--菜单-->
<ul id="menuList">
<li class="menuHome"><a href="#">首页</a></li>
<li class="menuDiv"></li><!--分隔竖-->
<li class="menuCon"><a href="#">公司简介</a></li>
<li class="menuDiv"></li>
<li class="menuCon"><a href="#">最新信息</a></li>
<li class="menuDiv"></li>
<li class="menuCon"><a href="#">产品展示</a></li>
<li class="menuDiv"></li>
<li class="menuCon"><a href="#">人才招聘</a></li>
<li class="menuDiv"></li>
<li class="menuCon"><a href="#">客服中心</a></li>
<li class="menuDiv"></li>
<li class="menuCon"><a href="#">联系我们</a></li>
<li class="menuDiv"></li>
<li class="menuSea">
<div class="textSea">
<form onsubmit="">
<input type="text" id="search" name="search" value="搜索"
onmouseover=this.focus();this.select();
onclick="if(value==defaultValue){value='';this.style.color='#999'}"
onBlur="if(!value){value=defaultValue;this.style.color='#999'}" />
</form>
</div>
</li>
</ul>
</div>
<div id="banner"><!--banner板块-->
</div>
</div>
<div id="main"><!--页面主体-->
<div id="sidebar"><!--侧栏-->
<div id="sidebar1"><!--侧栏1-->
<div class="sideTitle">
<div class="sideTitleLeft"></div>
<div class="sideTitleCenter"></div>
<div class="sideTitleRight"></div>
</div>
<div class="sideContent">
</div>
</div>
<div id="sidebar2"><!--侧栏2-->
<div class="sideTitle">
<div class="sideTitleLeft"></div>
<div class="sideTitleCenter"></div>
<div class="sideTitleRight"></div>
</div>
<div class="sideContent">
</div>
</div>
</div>
<div id="content"><!--页面内容-->
<div class="conTitle">
<div class="conTitleLeft"></div>
<div class="conTitleCenter"></div>
<div class="conTitleRight"></div>
</div>
<div class="conContent">
</div>
</div>
</div>
<div id="footer"><!--页面底部-->
</div>
</div>
</body>
</html> 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询