繁体   English   中英

如何不使用表格制作联系表?

[英]How do I make a contact form without using a table?

我想为我的网站填写联系表格。 我想不使用桌子就做。 我怎么做? 我正在查看div标签,因为我想使用CSS对其进行样式设置。 我想给它一个长度和宽度。 我想将其放置在主div标签中,但不确定如何操作。 请帮我。 我该怎么做?

尝试在Google上搜索:“联系表单CSS”。

您将获得大量带有提供代码的示例,以致您会迷失:D

看看这两个。

css-tricks.com

net.tutsplus.com

希望这可以帮助

我用过类似的东西-

<form id="contact-form" name="contact-form" action="/contact-us" method="post">
    <div class="form-col">
        <input type="text" name="Requester.FirstName" class="styled" placeholder="First Name">
        <input type="text" name="Requester.LastName" class="styled" placeholder="Last Name">
        <div class="selector fixedWidth">
           <span>Subject</span>
           <select name="Subject" class="styled">
            <option value="">Subject</option>
            <option value="custserv">Customer Service</option>
            <option value="vendor">Vendor</option>
            <option value="other">Other</option>
            </select>
        </div>
        <textarea name="message" class="styled"></textarea>
    </div>
    <div class="form-col">
        <input type="text" name="Requester.ContactInfo.Email" class="styled" placeholder="Email Address">
        <input type="text" name="Requester.ContactInfo.Phone" class="styled" placeholder="Phone Number">

        <span class="question">How do you prefer to be contacted?</span>
        <label for="contact-method-phone">
            <div class="radio" id="uniform-contact-method-phone"><span><input type="radio" name="ContactMethod" id="contact-method-phone" value="HomePhone" class="styled"></span></div>Phone
        </label>
        <label for="contact-method-email">
            <div class="radio" id="uniform-contact-method-phone"><span><input type="radio" name="ContactMethod" id="contact-method-phone" value="Email" class="styled"></span></div>Email
        </label>
        <input type="text" name="Address.StreetAddress1" class="styled" placeholder="Address">
        <input type="text" name="Address.StreetAddress1" class="styled">
        <input type="submit" value="CONTACT US" class="m-form-button" name="CONTACT US">
    </div>
</form>

而且我尝试在样式设计时遵循SMACSS

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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