ページにコンテンツがない場合、フッターが表示されます。レイアウト ファイルの私のコードは次のとおりです。
<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;
}