2012-07-10 121 views
1

如何按鈕「投票」用在這個截圖顯示「查看結果」對齊:如何重新定位一個div

enter image description here

在這撥弄它們出現相互之下:

http://jsfiddle.net/5YLNT/2/

我想我需要隱藏css類:'.pds-links',然後以某種方式在新位置重新顯示它?

背後搗鼓

代碼:

.pds-question-top { 
font-size:10pt !important; 
padding-top:1px !important; 
padding-bottom:1px !important; 
margin-top:1px !important; 
margin-bottom:1px !important; 
} 

.pds-pd-link { 
display:none !important; 
} 

.pds-box { 
width:220px !important; 
} 

.pds-input-label { 
width:85% !important; 
} 

.PDS_Poll { 
margin-bottom:15px; 
} 

.pds-answer-span { 
color:#00f; 
} 

.pds-vote { 
background-color:#424242; 
} 

.pds-answer-text { 
color:#00f; 
padding-top:1px !important; 
padding-bottom:1px !important; 
margin-top:1px !important; 
margin-bottom:1px !important; 
} 

.pds-answer-feedback { 
padding-top:1px !important; 
padding-bottom:1px !important; 
margin-top:1px !important; 
margin-bottom:1px !important; 
} 

.pds-votebutton-outer { 
text-align:center; 
} 

.pds-answer-group { 
padding-top:1px !important; 
padding-bottom:1px !important; 
margin-top:1px !important; 
margin-bottom:1px !important; 
height:auto; 
overflow:hidden; 
} 

.pds-input-label,.pds-answer-input { 
float:left; 
} 

.pds-view-results,.pds-links { 
color:#FFF !important; 
padding-top:1px !important; 
padding-bottom:1px !important; 
margin-top:1px !important; 
margin-bottom:1px !important; 
} 

.pds-comments,.pds-return-poll { 
color:#FFF !important; 
} 

<script type="text/javascript" charset="utf-8" src="http://static.polldaddy.com/p/6352993.js"></script> 
<noscript><a href="http://polldaddy.com/poll/6352993/">This is very long test question to test how polldaddy handles questions that exceed that normal length............ yes a very long question indeed..............</a></noscript> 

$(document).ready(function() { 


}); 
+0

.pds-links {刪除顯示:塊...這可以對齊按鈕投票 – 2012-07-10 09:11:55

+0

只需添加浮動:左隊友。無需刪除顯示:塊; – 2012-07-10 09:13:58

+0

你應該嘗試使用!重要的少一篇關於!important tag的文章=> http://coding.smashingmagazine.com/2010/11/02/the-important-css-declaration-how-and-when-to -用它/ – Liquid 2012-07-10 09:24:05

回答

1

你只需要做出votebutton浮動:左。

所以添加以下類:

.pds-vote-button 
{ 
    float: left; 
} 

很明顯,你可以在這裏調整頁邊距爲好。

這撥弄展示了新版本:

http://jsfiddle.net/5YLNT/4/

1
.pds-vote-button { 
    float: left; 
    margin: 0 8px; 
} 

像這樣的事情? 它把按鈕的左邊有一些餘量,使它看起來更愉快...