我想为div添加背景颜色,我将其命名为标题并以红色绘制。我用蓝色绘制的区域是绿色的sidemenu.content区域。
我的问题是我无法填写div标签背景颜色
我想在标题div标签中填充背景颜色。
.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 -->
答案 0 :(得分:0)
我不确定你要做什么。这就是我所做的。
https://gist.github.com/anonymous/1a40454674d832588bd8
(点击笔)。
希望它有所帮助
答案 1 :(得分:0)
试试这个
<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" style="background-color:#CC3300 !important;">
is it work for you.
</div> <!-- End of heading div -->
<div class="content">
</div> <!--End of content -->
</div> <!--End of rest div -->
答案 2 :(得分:0)
这就是你想要的。这只是一个粗略的设计 https://gist.github.com/anonymous/9d3552419e5a33822713