Using display: list-item;
, you can make divs behave as list items, which means they can get markers. If you set the list-style-type
to lower-alpha
you will receive just what you need, lowercase letters as markers.
/* the important part */
.simple-choice-inner {
display: list-item;
list-style: lower-alpha inside;
clear: left; /* clearing the radio floats */
}
/* make the child divs appear as inline content, in one line */
.simple-choice-inner div {
display: inline-block;
}
/* this is only used to make the radios appear before the letters */
.simple-choice-inner .choiceInput {
float: left;
margin-right: 10px;
}
I must point out that the right way would be to fix the HTML. You should use an <ol>
element, which is for an ordered list. But one thing needs to be fixed for sure: that id="block"
on every item. IDs must be unique in the whole document, so you can use them only once. Not doing so invalidates your HTML and might cause strange problems in the future.