css中的属性问题

来源:百度知道 编辑:UC知道 时间:2024/06/01 09:26:54
text-align:right;
vertical-align:text-bottom;
这两个属性在DIV中怎么不起作用啊
#menu
{
background:#9FF;
color:#666;
width:900px;
float:right;
clear:right;
overflow:hidden;
height:70px;
margin:0px auto;
text-align:right;
}
menu是一个DIV,为什么里面的内容不靠右啊

DIV本身就不认垂直定位的属性,水平定位text-align可以的。

天呢,你不应该把这些属性写在一个DIV里。有float就不能有margin,还有他们和text-align会有冲突,重新调整下,嵌套吧。