我正在制作一个小的颜色代码图例,但不知道如何使我的所有<li>
项目与它们所在的高度相同并将<div>
它们扩大,以便它们填充整个<div>
区域,而不仅仅是<label>
文本周围的区域。或者也许有人有另一个建议让它看起来更好?
#navlist li {
display: inline;
list-style-type: none;
padding-right: 30px;
}
#navcontainer {
background-color: White;
text-align: center;
border-spacing: 2px;
border-color: gray;
}
#legendTitle {
background-color: #ABAAC1;
font-weight: bold;
color: White;
padding: 5px;
}
.gvRowReqIncomplete {
background-color: #FAFAD2;
color: Red;
}
.gvRowReqAlmostComplete {
background-color: #FAFAD2;
color: Black;
font-weight: bold;
}
.gvRowReqComplete {
background-color: #ededf2;
color: Black;
font-weight: bold;
}
.gvRowSubReq {
background-color: #fbfbfb;
color: Black;
}
<div id="navcontainer">
<div id="legendTitle">Color Legend</div>
<br />
<ul id="navlist">
<li><label Class="gvRowReqComplete">Complete</label></li>
<li> <label Class="gvRowReqAlmostComplete">Partially Complete </label></li>
<li>
<Label Class="gvRowReqIncomplete">Incomplete Request</label>
</li>
<li>
<Label Class="gvRowSubReq">Response</label>
</li>
</ul>
</div>