I cannot figure out how to split items onto N columns.
I.E. into 3 columns. How it could be done? (No I just did all things vertically)
Thank you for any clue!!!
foreach (var answer in @question.Answers)
{
@Html.CheckBox("answer_CheckBox_" + answer.ID.ToString(), false, new { @id = answer.ID });
<label style="margin-left: 0.5em;">@answer.Title</label>
<br />
}
Use the modulus operator to separate answers into groups divisible by 3:
note – excuse my razor syntax if it isn’t sound…