+ -
当前位置:首页 → 问答吧 → 样式表问题。希望大家帮帮忙!

样式表问题。希望大家帮帮忙!

时间:2011-06-07

来源:互联网

是这样的。
  <div   class= "head ">
              <div   class= "logo ">
              </div>
              <div   class= "menumain ">
              </div>
                <div   class= "flash ">
                </div>
  </div>
    <div   class= "connet "   >  
                        <div   class= "left ">
                                        <div   class= "product ">
                                                <img   alt= " "   src= "Img/titlep.jpg "   />
                                                <br   /> asas <br   />
                                        </div>
                        </div>
                        <div   class= "right ">
                          <asp:ContentPlaceHolder   id= "ContentPlaceHolder1 "   runat= "server ">
                          </asp:ContentPlaceHolder>  
                        </div>
            </div>
  <div   class= "foot ">
            <asp:Label   ID= "Label1 "   runat= "server "   Text= "Label "> </asp:Label>
  </div>

这是母版页。高度都是auto;其中,connet有背景图片。。我在product里面写东西。浏览。结果背景图片没有跟着下来。
我再说的清楚一点:就是我想在product里面写东西。   写的高度是自动的。connet的高度也是自动的。我就想达到Product往下移动,connet也跟着下来。

作者: woshierbiluanzi   发布时间: 2011-06-07

又要自己顶一下!!!

作者: woshierbiluanzi   发布时间: 2011-06-07


.connet{ padding:0px;
  margin:0px;
  width:1002px;
  height:auto;
  background-image:url(../Img/connetbg.jpg);
 }

.left{ padding:0px;
  margin-top:10px;
  margin-left:10px;
  height:auto;
  width:237px;
  float:left;
  z-index:1;
}
.right 
{
  margin-top:10px;
  margin-left:10px;
  height:auto;
  width:719px;
}
.product{
  width:193px;
  height:auto;
  margin-left:10px;
  margin-top:20px;
  padding:0px;
  }

作者: woshierbiluanzi   发布时间: 2011-06-07


.head{ padding:0px;
  margin:0px;
  width:1002px;
  height:370px;
  background-image:url(../Img/headbg.jpg);
   
  }
 .logo{ padding:0px;
  width:990px;
  height:82px;
 }
.menumain{ padding-bottom:0px;
  padding-right:2px;
  line-height:40px;
  margin:0px;
  height:35px;
  width:511px;
  height:42px;
  float:right;
  text-align:right;
}

作者: woshierbiluanzi   发布时间: 2011-06-07

我看你是太着急了,问样式表的问题,应该把有关的样式贴出来才好,呵呵

作者: toury   发布时间: 2011-06-07

贴了啊。 请高手 给我三分钟时间帮我看看。

作者: woshierbiluanzi   发布时间: 2011-06-07

在right DIV下加个div,清除浮动
<div class= "right ">
  <asp:ContentPlaceHolder id= "ContentPlaceHolder1 " runat= "server ">
  </asp:ContentPlaceHolder>  
</div> 
<div style="clear:both;">

作者: toury   发布时间: 2011-06-07

以后把代码整理一下,用下面编辑器的“插入源代码”发出来。你的时间宝贵,别人的时间也同样.

作者: toury   发布时间: 2011-06-07