我正在尝试为饼图构建图例。下面仅显示图例的代码。我希望小彩色框浮动到左侧,文本(标签)紧贴在框的右侧。因此,将每个框标签对视为一个应该组合在一起的单元。下一个框标签对应垂直堆叠在下方。我不能让这个垂直堆栈发生。一切都试图继续向右流动,而不是在下面包裹和堆叠。请帮忙。
<td align="right" valign="top">
<div id='divDashboardNotStarted' class='PieLegendText' onclick='openDashboardInfo(this)' style='top: 15px;display: inline-block;clear:left'>
<div style='float:left; width:11px;height:11px;background-color:#DD6C40'> </div>
<div style='float:left'> <b>69% (88) Not Started</b></div>
</div>
<div id='divDashboardInProgress' class='PieLegendText' onclick='openDashboardInfo(this)' style='top: 25px;display: inline-block;clear:left'>
<div style='float:left; width:11px;height:11px;background-color:#ACD5E5'> </div>
<div style='float:left'> <b>5% (7) In Progress</b></div>
</div>
<div id='divDashboardCompleted' class='PieLegendText' onclick='openDashboardInfo(this)' style='top: 35px;display: inline-block;clear:left'>
<div style='float:left; width:11px;height:11px;background-color:#7FAABB'> </div>
<div style='float:left'> <b>9% (12) Completed</b></div>
</div>
<div id='divDashboardIncomplete' class='PieLegendText' onclick='openDashboardInfo(this)' style='top: 45px;'>
<div style='float:left; width:11px;height:11px;background-color:#5f7d89'> </div>
<div style='float:left'> <b>12% (16) Incomplete</b></div>
</div>
<div id='divDashboardCancelled' class='PieLegendText' onclick='openDashboardInfo(this)' style='top: 55px;'>
<div style='float:left; width:11px;height:11px;background-color:#efcd3f'> </div>
<div style='float:left'> <b>4% (5) Cancelled</b></div>
</div>
</td>