html - 更正 CSS 以按特定顺序显示 html 表单元素?

标签 html css forms smarty

    <input type="checkbox" ID="RecquireFacebookInvitesCB" />Require
    <select>
    {section name=foo start=5 loop=50 step=1}
        <option value="{$smarty.section.foo.index}">{$smarty.section.foo.index}</option>
    {/section}
    </select>
    this many Facebook invites before entering sweepstakes

enter image description here

我有上面的 html(带有 smarty-php 格式化标签),它生成两个表单元素和一些文本,如我的屏幕截图所示。我想将此显示为:

[CHECKBOX] Require [SELECTION LIST] Facebook invites before entering sweepstakes

我对如何实现这个有自己的想法,但我想知道最好的方法是什么。谢谢!

最佳答案

尝试将您的代码更改为:

<input type="checkbox" ID="RecquireFacebookInvitesCB" /><label for="RecquireFacebookInvitesCB">Require</label>
<select>
{section name=foo start=5 loop=50 step=1}
    <option value="{$smarty.section.foo.index}">{$smarty.section.foo.index}</option>
{/section}
</select>
this many Facebook invites before entering sweepstakes

关于html - 更正 CSS 以按特定顺序显示 html 表单元素?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6083375/

相关文章:

html - 在 HTML5 和 css 中调整和裁剪图像

javascript - .包括未找到期间

php - 如何在 PHP 中以单一表单循环访问常见字段集?

javascript - 从动态创建的 html 表单按钮调用 Javascript 函数

php - 无法从多个 html 复选框访问值

html - 更改 getElementsByClassName 的字体大小

jQuery 动画边框似乎不起作用

css - 使用 display-inline 集中一个 div 并受 float 影响

html - 列计算

javascript - 当其他 div 淡入 100% 时淡入 div