You must use <label for=""> for flags or radio stations, and vertical-align enough to align the flags
Try changing your markup to
<li> <input id="checkid" type="checkbox" value="test" /> <label for="checkid">testdata</label> </li>
<li> <input id="checkid2" type="checkbox" value="test" /> <label for="checkid2">testdata 2</label> </li>
And set the CSS as
input[type="checkbox"] { vertical-align:middle; }
In case of long text
label,input{ display: inline-block; vertical-align: middle; }
Side note: in the label, the flag value must be the identifier of the flag.
Fiddle
Updated Fiddle
Dhaval marthak
source share