我想將使用CSS的相同字段集中的複選框分成兩列。將字段集中的複選框分成兩列
例如,我的代碼如下:
<div id="topicsbox">
<label class="topicsname">Topics*</label>
<label class="description">Select topic areas for which you would like to receive future updates from CTU (articles, blog posts, white papers, etc.). Check all that apply:</label>
<div id="topicsmessage" class="messagebox"></div>
<fieldset>
<input type="checkbox" name="topics[]" id="AllTopStories" value="1098375" /><label for="AllTopStories">All Top Stories</label>
<input type="checkbox" name="topics[]" id="BusinessandManagement" value="1098376" /><label for="BusinessandManagement">Business and Management</label>
<input type="checkbox" name="topics[]" id="CareerandProfessional" value="1098377" /><label for="CareerandProfessional">Career and Professional</label>
<input type="checkbox" name="topics[]" id="CriminalJustice" value="1098378" /><label for="CriminalJustice">Criminal Justice</label>
<input type="checkbox" name="topics[]" id="HealthcareAdministration" value="1098379" /><label for="HealthcareAdministration">Healthcare Administration</label>
<input type="checkbox" name="topics[]" id="HomelandSecurity" value="1098380" /><label for="HomelandSecurity">Homeland Security</label>
<input type="checkbox" name="topics[]" id="ITEngineeringComputerScience" value="1098381" /><label for="ITEngineeringComputerScience">IT, Engineering, Computer Science</label>
</fieldset>
</div>
有誰知道正確的CSS分裂這個列表插入右邊的左邊和3 4個輸入複選框?
浮動左半右半。 – j08691
如果你設置字段集和輸入/標籤字段的寬度然後將它們浮動,該怎麼辦? – jtheman
'column-count:2'? – Jon