【发布时间】:2012-09-29 17:48:44
【问题描述】:
我为此苦苦挣扎了一个多小时。 我希望“向上”和“向下”类中的图像内联显示。 我忽略了什么?
我也试过 display:inline,但它也不起作用。 如果它有帮助,我也在使用带有 rails 的 twitter bootstrap。
pages.css
body {
background-color: grey;
}
.up img {
width: 30px;
height:30px;
padding: 5px 5px 5px 5px;
display:inline-block;
}
.down img{
width: 30px;
height:30px;
padding: 5px 5px 5px 5px;
display:inline-block;
}
index.html.haml
- title "Demociaki"
- for demot in @demots
.demot
= image_tag demot.photo.url
%br
.voting
.up= link_to image_tag("up.jpeg"), vote_up_demot_path(demot), :method => :post
.down= link_to image_tag('down.jpeg'), vote_down_demot_path(demot), :method => :post
%h3= demot.votes_for
【问题讨论】:
标签: css ruby-on-rails haml