响应式复选框太宽

时间:2017-02-12 15:16:34

标签: ruby-on-rails twitter-bootstrap-3 frontend

我正在尝试使用Rails和Bootstrap进行简单的测验,但是我的小屏幕上的复选框太宽而且它覆盖了该复选框的标签(pic rel

我的观点如下:

<div class="center jumbotron">
  <h2><%= t(:quiz) %></h2>
  <div>
    <%= form_for(:test, url: quiz_path) do |f| %>
      <% @quiz.tasks.each_with_index do |task, index| %>
        <div>
          <% if task = Task.find_by(id: task) %>
            <%= image_tag(task.asset, class: "img-responsive") %>
            <%= task.text %>
            <% answers = task.correct_answers + task.wrong_answers %>
            <% answers.shuffle! %>
            <fieldset>
              <!-- Dodać półotwarte -->
              <% answers.each do |answer| %>
                <div class="checkbox">
                  <%= f.check_box("task#{index}", {class: "checkbox", multiple: true}, answer, nil)%>
                  <%= f.label "task#{index}", answer %>
                </div>
              <% end %>
            </fieldset>
          <% end %>
        </div>
      <% end %>
      <%= f.submit t(:finish_quiz), class: "btn btn-lg btn-primary" %>
    <% end %>
  </div>
</div>

如何使它看起来像桌面版一样正常a.k.a.,只是更大(当然是方形的)?

0 个答案:

没有答案
相关问题