If you double-check on demo.moodle.net, you should find that the problem does not happen there.
So, there are two possiblities as to why this is going wrong in your system:
- You have a custom theme that adds some style rules that are ill-advised.
- The content of this question contains some junk HTML tags that are breaking the layout.
Probably the easiest way to diagnose what is going on is to use Firefox or Chrome develoer tools. Right-click on one of the choices, and choose Inspect element.... This assumes you know a bit of HTML.