0
我有一篇文章「標籤」側邊欄,它正確定位在主頁上,但在我所有其他頁面上爬行。我正在使用Kaminari paginate插件。它讓我瘋狂 - 我怎麼能阻止這種事情發生?標籤邊欄向上移動?
CSS
.sidebar {
position:absolute;
width: 150px;
float:right;
padding: 0px 0px 0px 20px;
margin: -1500px 0px 0px 700px;
}
_side.html.erb
<div id="art">
<%= link_to 'Post An Article', new_article_path %>
</div>
<div id="iphone">
<%= image_tag "iPhone.png" %>
</div>
<br />
<div id="soc-med">
<%= link_to image_tag("facebook.png"), "http://www.facebook.com/" %>
<%= link_to image_tag ("twitter.png"), "http://twitter.com/#!/" %>
</div>
<div id="tag_title">
<h3>Article Tags</h3>
</div>
<div id= "tags" >
<% cache('all_tags') do %>
<% for tag in Tag.find(:all, :order => 'name') %>
<ul style="list-style-type: none">
<li>
<%= link_to "#{tag.name}", tag_path(tag) %>
</li>
</ul>
<% end %>
</div>
<% end %>
</div>
不可能幫助沒有更多的代碼或將活動鏈接 – Ross 2011-05-23 20:48:37
這取決於家庭和內頁之間的代碼。你能分享這兩個HTML代碼? – jackJoe 2011-05-23 20:51:15
@Ross @jackJoe - 添加了上面的代碼。你能提出一個解決方案嗎? – ubique 2011-05-25 21:59:39