dongwen9975 2015-03-06 06:36
浏览 60

div标签背景的CSS

I want to add background color to div which I name d it as heading and drawn in red color.Area which I drawn in blue is sidemenu.content area in green color. My problem is I can't fill the div tag background color I want to fill background color in heading div tag. sample layout

.heading{
 float:left;
 margin-top:0px;
 margin-left:170px;
 height:25px;
   border: 1px solid #f9f2f2;
}
.rest {
  height: 685px;
  background: -o-linear-gradient(bottom, #e5e3e3 5%, #ffffff 100%);
  background: -webkit-gradient(linear, left top, left bottom, color-stop(0.05, #e5e3e3), color-stop(1, #ffffff));
  background: -moz-linear-gradient(center top, #e5e3e3 5%, #ffffff 100%);
  filter: progid: DXImageTransform.Microsoft.gradient(startColorstr="#e5e3e3", endColorstr="#ffffff");
  background: -o-linear-gradient(top, #e5e3e3, ffffff);
  background-color: #e5e3e3;
  border: 1px solid #f9f2f2;
  border-width: 0px 0px 0px 0px;
  border-radius: 0px 0px 10px 10px;
  text-align: left;
  padding: 0px 7px;
}
.sidemenu {
  float: left;
  margin-top: 150px;
 
  height: 250px;
  width: 150px;
  border: 1px solid #f9f2f2;
  border-radius: 10px;
}
.content {
  border-left: thick solid #f9f2f2;
}
hr {
  margin: 0;
  margin-left:170px;
  width: 1px; 
  height: 685px;
 border:0;
background: #fff;
}
                <div class="rest">
                  <div class="side">
                   <div class="sidemenu">
                        <div class="1 menu">
                          <a href="admin_dashboard.php" class="astext">Profile</a>
                        </div> <!--End of menu1 -->
                        <div class="2 menu">
                          <a href="clients.php" class="astext">Clients</a>
                        </div> <!--End of menu 2-->
                        <div class="3 menu">
                          <a href="employees.php" class="astext">Employees</a>
                        </div> <!--End of menu 3-->
                        <div class="menu 4">
                        <a href="admin_file_view.php" class="astext">Documents</a>
                        </div> <!--End of menu 4-->
                   </div> <!--End of side menu -->
                   </div>  <!--End of side div -->
                   <hr>
                       <div class="heading">
                         
                       </div>   <!-- End of heading div -->
                   <div class="content">
                     
                   </div> <!--End of content -->
                </div> <!--End of rest div -->

</div>
  • 写回答

3条回答 默认 最新

  • doubei3312 2015-03-06 07:02
    关注

    I am not sure what you are trying to do. Here is what i have done. https://gist.github.com/anonymous/1a40454674d832588bd8
    (click on pen). Hope it helps

    评论

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度