我有一个rails应用程序,我正在使用bootswatch for css。我有一个带有容器和桌子的页面。但是,即使内容超短,表格也会从容器中消失。
这是我的html.erb页面:
<div class="jumbotron col-lg-offset-1 col-lg-10">
<h2><%= @user.name%></h2>
<%= image_tag(@user.photo.url(:regular))%>
<p><strong>Description: </strong> <%= @user.bio %> </p>
<% if @user.privacy == 'public' %><p><strong>Email: </strong><%= @user.email %></p><% end%>
<p><strong> Role: </strong> <%= @user.status.camelize %> </p>
<p><strong>Compétences: </strong>
<% @user.skills.each do |s| %>
<span class="label label-success"><%= s.value.camelize%></span>
<% end %>
</p>
<p><strong>Solde: </strong> <%= @user.amount %> </p>
<div class="row">
<div class="bs-component">
<legend class="col-lg-10 col-lg-offset-1">Liste des projets de <%= current_user.name%></legend>
<table class="table table-striped table-hover col-lg-offset-2 col-lg-6 ">
<thead>
<tr>
<th>Nom du projet</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<% @projects.each do |project| %>
<tr>
<td><%= link_to project.name, project_path(project.id) %></td>
<td><%= project.description %></td>
</tr>
<% end %>
</tbody>
</table>
</div>
</div>
</div>
我该怎样做才能避免这种情况? 在此先感谢您的帮助