CSS Simple Contact Form



CSS Simple Contact Form, compatible with all major browsers. Pure CSS no images or javascript.

Demo:

How to use:

  • Open text editor like Notepad or any other.
  • Copy HTML code and paste into the text editor.
  • Save file as anyname.html or anyname.htm
  • Create new document.
  • Copy and paste CSS code into text editor.
  • Save file as contact.css

HTML code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="contact.css" />
<title>CSS Simple Contact form</title>
</head>
<body>

<div class="contact">
<form>
  <input type="text" placeholder="Name" id="Name">  
  <input type="text" placeholder="Email" id="Email">  
  <textarea name="message" cols="22" rows="5" placeholder="Your message here..." id="Message"></textarea>
    <input type="submit" value="Submit">
    <input type="reset" value="Clear">
</form>
</div>

</body>
</html>

CSS code:
/* CSSTerm.com CSS Simple Contact form */

.contact { 
	height:210px;
	width:195px;
	margin:auto;
	border:1px #CCC solid;
	padding:10px;
	text-align:right;
}

.contact input, .contact textarea { 
	padding:5px;
	margin:5px
 }