是否可以在这个 fiddle 中对齐跨度“Header”:http://jsfiddle.net/25LjE/37/在文本右侧,如图所示:
我正在使用 jquery 创建 header 。
这是 fiddle 代码:
<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>
.pds-pd-link {
display: none !important;
}
.pds-box {
width: 220px !important;
}
.pds-input-label{
width: auto! important;
}
.PDS_Poll{
margin-bottom:15px;
}
$(document).ready(function() {
$('.pds-question-inner').prepend('<center><span style="color:red;font-weight:bold;font-size: 10pt"><u>Header</u></span></center>');
});
当我在 IE8 中尝试建议的解决方案时,文本略高于其余文本:
这可以修复吗?
最佳答案
我不太清楚您要实现的目标,但添加此 CSS 似乎可以完成此任务:
center span{
position:relative;
top:30px;
left:-70px;
}
关于javascript - 将 span 元素对齐到 div 的左侧,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11344882/