当我的页面上没有内容时,页脚会上升。我在布局文件中的代码是这样的:
<div class="container-fluid">
<div class="row-fluid">
<!--<div class="span3">
<div class="well sidebar-nav">
<ul class="nav nav-list">
<li class="nav-header">Sidebar</li>
<li><%#= link_to "Link1", "/path1" %></li>
<li><%#= link_to "Link2", "/path2" %></li>
<li><%#= link_to "Link3", "/path3" %></li>
</ul>
</div><!/.well -->
<!-- </div> -->
<div class="span9">
<div id="alert">
<% flash.each do |key, value| %>
<%= content_tag :div, :id=>'flash_msg', :class => "alert alert-#{key}" do %>
<%= value unless value.blank? %>
<a class="close" data-dismiss="alert">×</a>
<% flash.discard -%>
<% end %>
<% end %>
</div>
<%= yield %>
</div>
</div><!--/row-->
<footer class="footer-fix">
<p>© <%= Time.now.strftime("%Y") -%> Icicle Technologies Private Limited </p>
</footer>
</div> <!-- /container -->
当我将页脚放在容器流体类之外时,我也会遇到同样的问题。我可以在css中包含什么。有人能帮我吗?对于页脚修复,css 是:
.footer-fix{
text-align: center;
}