次のHTMLコードは、<div></div>
コンテナ内にチェックボックスを表示しようとします。
<div style="overflow: auto; width: auto; display:block; max-height:130px; max-width:200px; background-color: #FFF; height: auto; border: 1px double #336699; padding-left: 2px;">
<label for="chk12" style='white-space: nowrap;'>
<input type='checkbox' id="chk12" name='chk_colours' value="12" class='validate[required] text-input text'>
<div style='background-color:#FF8C00; width: 180px;' title="darkorange"> </div>
</label>
<label for="chk11" style='white-space: nowrap;'>
<input type='checkbox' id="chk11" name='chk_colours' value="11" class='validate[required] text-input text'>
<div style='background-color:#D9D919; width: 180px;' title="brightgold"> </div>
</label>
<label for="chk10" style='white-space: nowrap;'>
<input type='checkbox' id="chk10" name='chk_colours' value="10" class='validate[required] text-input text'>
<div style='background-color:#76EE00; width: 180px;' title="chartreuse2"> </div>
</label>
<label for="chk9" style='white-space: nowrap;'>
<input type='checkbox' id="chk9" name='chk_colours' value="9" class='validate[required] text-input text'>
<div style='background-color:#2E0854; width: 180px;' title="indigo"> </div>
</label>
<label for="chk8" style='white-space: nowrap;'>
<input type='checkbox' id="chk8" name='chk_colours' value="8" class='validate[required] text-input text'>
<div style='background-color:#292929; width: 180px;' title="gray16"> </div>
</label>
</div>
表示される内容は、次のスナップショットで確認できます。
<div>
次のタグを使用して表示されるさまざまなカラーストライプが表示されます
<div style='background-color:#FF8C00; width: 180px;' title="darkorange">  </div>
white-space: nowrap;
style属性を使用している場合でも、直線で表示されることが期待されるそれぞれのチェックボックスの下に表示されます。
各ストライプとそれぞれのチェックボックスを直線で表示するにはどうすればよいですか?
それは私の質問の1つ自体で説明されましたが、その質問では、各チェックボックスにそのようなカラーストライプの代わりにテキストラベルがありました。こちらです。私はその質問の受け入れられた答えで述べられているようにしようとしましたが、この場合は役に立ちませんでした。