简体   繁体   中英

How to reposition a div

How can the button "Vote" be aligned with "View Results" as shown in this screenshot:

在此处输入图片说明

In this fiddle they are appearing beneath each other :

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

I think I need to hide the css class : '.pds-links' and then re-display it at new position somehow ?

Code behind fiddle :

.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() {


});

Just make .pds-links display inline instead of block.

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

You simply need to make the votebutton float: left.

So add the following class:

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

Obviously you can tweak the margins in here as well.

This fiddle shows the new version:

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

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

Something like this? It puts the button on the left with some margin to make it more pleasant to see...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM