css样式不起作用——id选择器的优先级不是高于元素选择器吗?该怎么处理
css样式不起作用——id选择器的优先级不是高于元素选择器吗?
请看代码
效果图:

按照css的定义,div1,div2,div3都应该横向排列才对呀?为什么呈现效果是纵向的?求教各位
------解决思路----------------------
我也看到了,#div0的样式那里width多了个冒号。
请看代码
<!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>
<style type="text/css">
div{display:inline;width:100px;height:100px;padding:0;margin:0;float:left;}
#div0{ width::400px;height:200px; background-color:black;display:block;float:none;}
.div1{ background-color:red;}
.div2{ background-color:blue;}
.div3{ background-color:yellow;}
</style>
</head>
<body>
<div id="div0">
<div class="div1"> 1</div>
<div class="div2"> 2</div>
<div class="div3"> 3</div>
</div>
</body>
</html>
效果图:
按照css的定义,div1,div2,div3都应该横向排列才对呀?为什么呈现效果是纵向的?求教各位
------解决思路----------------------
我也看到了,#div0的样式那里width多了个冒号。