Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Old 11-05-2009, 03:02 PM   PM User | #1
SteveH
Regular Coder

 
Join Date: Nov 2005
Posts: 335
Thanks: 25
Thanked 1 Time in 1 Post
SteveH is an unknown quantity at this point
Add new form field

Hello

This might be a simple question, but it is stretching my mind!

I have a HTML page and clicking on a link brings up a light-box. The lightbox is a form linked to three CDD files and a PHP files which processes the form in the background when the site visitor clicks 'submit'.

I am proposing to add another field to the form which will alllow visitors to attach files to their message.

I have to be a bit careful how I code this because the form also links to three JavaScript files and everything interrelates.

The three CSS files are as follows:

contact.css:

Code:
body {height:100%; margin:0;}

/* Overlay */
#contact-overlay {background-color:#000; cursor:wait;}

/* Container */
#contact-container {width:430px; font-family:Verdana, Arial; font-size:12px; text-align:left;}
#contact-container .contact-content {background-color:#333; color:#ddd; height:40px;}
#contact-container h1 {color:#F6E095; margin:0; padding:0 0 6px 12px; font-size:1.2em; text-align:left;}
#contact-container .contact-loading {position:absolute; background:url(../img/contact/loading.gif) no-repeat; z-index:8000; height:55px; width:54px; margin:-14px 0 0 170px; padding:0;}
#contact-container .contact-message {text-align:center;}
#contact-container .contact-error {width:92%; font-size:.8em; background:#000; border:2px solid #ccc; font-size:0.8em; font-weight:bold; margin:0 auto; padding:2px;}
#contact-container br {clear:both;}
#contact-container form {padding:0; margin:0;}
#contact-container label {clear:left; display:block; width:100px; float:left; text-align:right; padding-right:4px; font-weight:bold;}
#contact-container .contact-input {font-family:Verdana, Arial; float:left; padding:2px; margin:2px; background:#eee; border:1px solid #fff; width:300px;}
#contact-container textarea {height:114px; font-size:.9em;}
#contact-container .contact-cc {font-size:.9em; cursor:default;}
#contact-container .contact-top {height:13px; background:url(../img/contact/form_top.gif) no-repeat; padding:0; margin:0;}
#contact-container .contact-bottom {height:13px; background:url(../img/contact/form_bottom.gif) no-repeat; font-size:.7em; text-align:center;}
#contact-container .contact-bottom a,
#contact-container .contact-bottom a:link,
#contact-container .contact-bottom a:active,
#contact-container .contact-bottom a:visited {position:relative; top:-4px; text-decoration:none; color:#666;}
#contact-container .contact-bottom a:hover {color:#888;}
#contact-container .contact-button {margin:4px 0 0 4px; cursor:pointer; height:24px; border:0; font-size:1em; font-weight:bold; color:#fff; text-align:center; vertical-align:middle;}
#contact-container .contact-send {width:50px; background:url(../img/contact/send.png) no-repeat;}
#contact-container .contact-cancel {width:65px; background:url(../img/contact/cancel.png) no-repeat;}
#contact-container a.modal-close,
#contact-container a.modal-close:link,
#contact-container a.modal-close:active,
#contact-container a.modal-close:visited {text-decoration:none; font-weight:bold; font-size:1.2em; position:absolute; top:-4px; right:6px; color:#999;}
#contact-container a.modal-close:hover {color:#9bb3b3;}
default.css

Code:
*{
	margin:0;
	padding:0;
}
body{
	margin:30px 0 30px 0;
	text-align:center;
	background-color:#62E122;
	font-size:80%;
	font-family:"Lucida Grande", Tahoma, sans-serif;
}
p{
	margin:0 0 1em 0;
}
a{
	color:green;
}
a img{
	border:none !important;
}
#container{
	margin:0 auto;
	width:500px;
	padding:40px;
	text-align:left;
	background-color:#fff;
}
#container ul{
	text-align:center;
	margin:0 0 30px 0;
	list-style:none;
}
#container ul a{
	border:1px solid #eee;
	background-color:#f5f5f5;
	color:#444;
	font-size:1.5em;
	line-height:2em;
	padding:20px;
	margin:0 0 20px 0;
	display:block;
}
#container ul a:hover{
	border:1px solid #B5DF99;
	background-color:#CDEFB6;
	color:#358610;
}

#lightbox h2{
	margin:0 0 1em 0;
}
#lightbox h3{
	color:#FF713F;
}
#lightbox.done p{
	color:#333;
}

#form{
	text-align:left;
	margin:25px;
}
#form ul{
	list-style:none;
}
#form li{
	margin:0 0 1em 0;
}
#form textarea{
	width:100%;
	height:150px;
}

#definition{
	margin:25px;
}
.highlight{
	background-color:#FEFFAF;
}
lightbox.css

Code:
#lightbox{
	display:none;
	position: absolute;
	top:50%;
	left:50%;
	z-index:9999;
	width:500px;
	height:400px;
	margin:-220px 0 0 -250px;
	border:1px solid #fff;
	background:#FDFCE9;
	text-align:left;
}
#lightbox[id]{
	position:fixed;
}

#overlay{
	display:none;
	position:absolute;
	top:0;
	left:0;
	width:100%;
	height:100%;
	z-index:5000;
	background-color:#000;
	-moz-opacity: 0.8;
	opacity:.80;
	filter: alpha(opacity=80);
}
#overlay[id]{
	position:fixed;
}

#lightbox.done #lbLoadMessage{
	display:none;
}
#lightbox.done #lbContent{
	display:block;
}
#lightbox.loading #lbContent{
	display:none;
}
#lightbox.loading #lbLoadMessage{
	display:block;
}

#lightbox.done img{
	width:100%;
	height:100%;
}
The question I have is where do I begin to add the new form field!?

Many thanks.

Steve
SteveH is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:16 AM.

Home - Contact Us - Archives - Link to CF - Resources - Top 

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.