2014-12-02 70 views
-1

我自己学习HTML和CSS,并且必须知道关于电子邮件表单的位,所以我有一个工作表单(不使用php),但唯一的问题是它看起来很糟糕,吨有关于如何编辑任何线索它HTML和CSS中的表格

<p> 
<label for="myemail">Your e-mail:<span id="star">*</span></label> 
<input type="email" name="myemail" id="myemail" value="type your email..." maxlength="40" size="20" required="required" onclick="this.value=''" /><br> 
<label for="fullmane">Your full name:<span id="star">*</span></label> 
<input type="fullname" name="name" id="fullname" value="Please enter your full name.." maxlength="40" size="20" required="required" onclick="this.value=''"/> 
<br> 
<label for="emailcontent">Comments:</label> 
<div id="email"> 
<input type="emailcontent" name="emailcontent" id="emailcontent" value="Please enter your question..." maxlength="20" size="20" required="required" /> 
</div> 

好了,所以这是给一个形式的基本外观和有一对夫妇的事情,我想改变: 1)emailcontent箱子的大小,我已经在一个CSS文件中完成了这个工作,但它仍然只在一行中写入框的中间, 2)当它打字时自动启动一个新行而不是停止。 3)改变按钮的外观(将我需要使用Javascript?) 4)有它在一个单独的窗口中打开,点击点击前页后

任何帮助将是巨大的感谢

+2

*我在CSS文件中已经做到了这一点。*:然后添加相关CSS以及在问题。 – Abhitalks 2014-12-02 12:31:23

+3

这里有成千上万的例子和Web上的表单教程[这里是http://learn.shayhowe.com/html-css/building-forms/)就是这样一个例子。 [这里是打开一个弹出窗口](http://www.quackit.com/html/codes/html_popup_window_code.cfm)。请至少在发帖前尝试研究 – jbutler483 2014-12-02 12:34:19

+2

考虑谷歌作为你最好的朋友。你会得到它的一切。 – 2014-12-02 13:05:50

回答

0

您可以使用CSS风格你的按钮是这样的: -

input[type=fullname] 
{ 
    padding:5px; border:2px solid #ccc; 
    -webkit-border-radius: 5px; 
    border-radius: 5px; 
} 

input[type=text]:focus {border-color:#333; } 

input[type=email] 
{ 
    padding:5px 15px; 
    background:#ccc; 
    border:0 none; 
    cursor:pointer; 
    -webkit-border-radius: 5px; 
    border-radius: 5px; 
}