html - 为什么我不能定位我的表格?

标签 html css forms

无论我尝试过什么,无论我尝试过什么,我似乎都无法定位表格。我用 DIV 将表单括起来以尝试定位,但它始终位于页面顶部:这是我的 CSS。

contactform{
position        : absolute;
left            : 415.50pt;
top             : 345.00pt;
width           : 252.75pt;
height          : 168.00pt;
}

这是我的 HTML

<div id="contactForm">
    <form class="cmxform" id="commentForm" method="get" action="">
       <fieldset>
        <legend>Please provide your name, email address (won't be published) and a     comment</legend>
        <p>
        <label for="cname">Name (required, at least 2 characters)</label>
        <input id="cname" name="name" minlength="2" type="text" required/>
        </p>
        <p>
        <label for="cemail">E-Mail (required)</label>
        <input id="cemail" type="email" name="email" required/>
        </p>
        <p>
        <label for="curl">URL (optional)</label>
        <input id="curl" type="url" name="url"/>
        </p>
        <p>
        <label for="ccomment">Your comment (required)</label>
        <textarea id="ccomment" name="comment" required></textarea>
        </p>
        <p>
        <input class="submit" type="submit" value="Submit"/>
        </p>
        </fieldset>
    </form>
    <script>
    $("#commentForm").validate();
    </script>
</div>

感谢您的帮助!

最佳答案

你错过了#

#contactform
{
    position        : absolute;
    left            : 415.50pt;
    top             : 345.00pt;
    width           : 252.75pt;
    height          : 168.00pt;
}

关于html - 为什么我不能定位我的表格?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23464264/

相关文章:

javascript - 调整 jQuery Accordion - 打开所有选项卡

php - 生日登记表麻烦

php - $_POST 与 klein.php 路由器 : How to pass $_POST to a view?

javascript - 如何修复表中的数据范围过滤器?

JavaScript 动画 - 在到达外部 div 边界时停止内部 div 移动

javascript - 如何在 Angular js 中的 http 请求中发送 header 数据

javascript - 浏览器中的动画透明图像噪声 - Limbo Effect

javascript - 跨浏览器禁用用户选择(Ctrl + A)

css - 根据他的内容更改父 li 元素类

html - 如何从 HTML GET 请求中排除未指定的表单项