Is there are reason why the float property should impact the functioning of a check box?
I have the following Rails Form
<%= simple_form_for @user do |f| %>
<ul class="publications">
<% @citations.each do |publication| %>
<li>
<div class = "PublicationCheckbox"><%= check_box_tag "publications[]", publication[:id] %></div>
<div class = "PublicationString">
<b><%= publication[:title] %></b>
<%= publication[:authors] %>.
<i><%= publication[:journal] %></i>,
<%= publication[:year] %>,
<%= publication[:volume] %>:
<%= publication[:pages] %>
</div>
</li>
<% end %>
<div class="actions">
<%= f.submit "Add to profile" %>
</div>
<%= link_to 'Show', @user %> |
<%= link_to 'Back', users_path %>
</ul>
<% end %>>
Here is the CSS
.publications {
list-style: none;
padding: 0;
li {
padding: 15px 0;
border-top: 1px solid #e8e8e8;
float: left;
}
.PublicationCheckbox{
float: left;
}
.PublicationString {
padding: 0px !important;
padding-bottom: 10px !important;
margin-left: 20px !important;
float: left;
}
}
As it stands above, the checkboxes won't check. If I remove the float property from the the checkbox they work.
Aucun commentaire:
Enregistrer un commentaire