順序付きリスト内の順序なしリスト項目のように、チェック ボックス項目をインデントすることはできますか?
これまでに直面した主な問題は、複数行のテキストがインデントされないことです。そのレイアウトのためだけにテーブルを作成したくありません。
要件は IE8 です (わかっています、わかっていますが、銀行向けです)。
新しい更新: 最終的には次のようなものを使用します。これは IE8 でうまく機能し、Firefox 22 でも適切に機能します。
<div>My list starts here.</div>
<ol>
<li>First item
<br/>
<input type="checkbox" name="item1" /><span class="CheckBoxSpan"></span>
<label>Checkbox item one, it also need be indent probaly like an list item, what happens if it has more than one line, it need be indentes, not wrap</label>
<br/>
<input type="checkbox" name="item1" /><span class="CheckBoxSpan"></span>
<label>Another checkbox item one, again it also need be indent probaly like an list item, what happens if it has more than one line, it need be indentes, not wrap</label>
</li>
</ol>
そしてCSS
.CheckBoxSpan
{
position: relative;
left: 4em;
}
li label
{
display:inline-block;
max-width:80%;
vertical-align:top
}
li input
{
width: 1.4em;
margin-left: -1.9em;
}