日期:2014-05-17  浏览次数:20675 次

div中元素的顺序?!


不知道图片能不能看见?


代码是:

HTML code

      <div class="grid_39" style="background:#F33;background:url(images/head_news.gif);height:282px;margin:0px;">
          <div class="title_bar">
              <div class="left_wing"></div>
                <div class="title_bar_text">头条新闻</div>
                <div class="right_wing"></div>
                <a href="www.baidu.com"><div class="more"></div></a>
                <div class="cloud"></div>
          </div>
      </div>




css代码是
CSS code

.title_bar{height:23px;width:100%;padding:8px 0 4px 5px;}
.title_bar .left_wing{width:43px;height:23px; background:url(../images/wing_left.gif);float:left;}
.title_bar .title_bar_text{font-size:14px; color:white; line-height:23px; height:23px;float:left; background:url(../images/title_bar_text.gif) repeat-x;padding:0 1px 0 1px; letter-spacing: 5px; font-weight:bold;}
.title_bar .right_wing{width:49px;height:23px; background:url(../images/wing_right.gif);float:left;}
.title_bar .more{width:44px; height:23px; background:url(../images/more.gif) no-repeat;float:right;padding-right:3px;}
.title_bar .cloud{width:77px;height:23px; background:url(../images/cloud.gif) no-repeat;float:right;padding-right:8px;}




为什么more那个按钮会跑到最右边? 不是写在cloud前面了吗? 
实在不懂了。。。

------解决方案--------------------
A:左
B:左
则A,B

反之
C:右
D:右
则D,C

楼主明白了吗