将文本与单选按钮对齐

时间:2012-07-03 14:18:20

标签: javascript jquery

在下面的脚本中:

<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>​

我修改了文本的宽度,使其适合220px。如果文本具有一定长度,则会导致文本在单选按钮下面换行。正如这个小提琴所示:

http://jsfiddle.net/25LjE/8/

选项应该包含在单选按钮右侧,如图所示:

enter image description here

这可能吗?我想我需要修改课程“pds-answer-span”?

3 个答案:

答案 0 :(得分:1)

在CSS面板上添加此样式

.pds-input-label { width: 85% !important }
.pds-input-label, .pds-answer-input { float: left;  } 
.pds-answer-group { height: auto; overflow: hidden; /* float clearing */ }

你达到了预期的效果

答案 1 :(得分:1)

试试这个 - http://jsfiddle.net/25LjE/11/

.pds-answer-input { margin-top: 4px; }

.pds-answer-input,
.pds-input-label { display: inline-block; max-width: 170px; }

答案 2 :(得分:0)

删除此

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

添加此项(其中100px是您所需的宽度)

#PDI_container6352993 .pds-input-label { 
    width 100px; 
}