私はこれに1時間以上苦労しています。クラス「up」と「down」の画像をインラインで表示したい。私は何を見落としていますか?
display:inline も試しましたが、うまくいきません。参考になれば、Rails で Twitter ブートストラップも使用しています。
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