Add a form field

This is a discussion on "Add a form field" within the Web Page Design section. This forum, and the thread "Add a form field are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Nov 20th, 2005, 11:33
csa csa is offline
Up'n'Coming Member
Join Date: Nov 2005
Posts: 67
Thanks: 0
Thanked 0 Times in 0 Posts
Add a form field

I would like to add a keysearch field form into the top blue section of my site. (see attached) The problem is when I add the form tag it pushing the div height throwing the layout.

Is there a neat way of adding form content to an area such as this and still have control over how it looks?
Thanks
Attached Images
File Type: gif top.gif (3.1 KB, 39 views)
Reply With Quote

  #2 (permalink)  
Old Nov 20th, 2005, 12:31
Junior Member
Join Date: Nov 2005
Location: Cleveland, Ohio
Age: 24
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to yngexec Send a message via Yahoo to yngexec Send a message via Skype™ to yngexec
Re: Add a form field

Quote:
Originally Posted by csa
I would like to add a keysearch field form into the top blue section of my site. (see attached) The problem is when I add the form tag it pushing the div height throwing the layout.

Is there a neat way of adding form content to an area such as this and still have control over how it looks?
Thanks
Try applying a style to the form with a margin: 0;
Reply With Quote
  #3 (permalink)  
Old Nov 20th, 2005, 13:45
csa csa is offline
Up'n'Coming Member
Join Date: Nov 2005
Posts: 67
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Add a form field

Not sure how to include this? I've done the following but is doens't work, so I'm not sure what goes where


<div id="keysearch">
<form name="form1" method="post" action="">
<input type="text" name="textfield">
</form></div>
CSS
#keysearch{
margin:0;
}

Last edited by csa; Nov 20th, 2005 at 14:03.
Reply With Quote
  #4 (permalink)  
Old Nov 20th, 2005, 14:11
Junior Member
Join Date: Nov 2005
Location: Cleveland, Ohio
Age: 24
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to yngexec Send a message via Yahoo to yngexec Send a message via Skype™ to yngexec
Re: Add a form field

Code: Select all
<HTML>
<HEAD>
</HEAD>
<BODY>
<STYLE>
form {
  margin: 0;
 }
</STYLE>
Random text and stuff...blah blah blah blah blah blah...
</BODY>
</HTML
Reply With Quote
  #5 (permalink)  
Old Nov 20th, 2005, 14:42
csa csa is offline
Up'n'Coming Member
Join Date: Nov 2005
Posts: 67
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Add a form field

Right this is where I've got too

http://www.media-drive.co.uk/nti/store/index20.htm

I quite like where the keyword search currently is, however I was trying to get this onto the grey bar above but I can't seem to get this to work.

By applying the margin: 0px is this suppost to make the field height slimmer? as it still looks quite big. The code I've used is below. Thanks

css

form#login {
background-color: #CCCCCC;
color: #000000;
border: 1px solid #999999;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
text-align: right;
margin: 0px;
}
#login .buttons {
font-family:Arial, Helvetica, sans-serif;
font-size: 10px;
background-color: #163A78;
color: #ffffff;
margin-right: 6px;
margin:0px;
}
.buttons{
font-family:Arial, Helvetica, sans-serif;
font-size: 10px;
background-color: #163A78;
color: #ffffff;
margin-right: 6px;
}
.fieldcell {
background-color: #F2F7FB;
color: #000000;
text-align: left;
margin-right: 0px;
padding-right: 0px;
margin: 0px;
}

html

<div id="contentheader">
<h1> 0121 <span class="class1"><a href="home.asp">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;enquiries@e.co.uk</a></span></h1>
<form name="login" id="login" method="post" action="#">
<label>
<input name="textfield" type="text" class="fieldcell" value="Keyword Search" size="16">
<input name="Submit" type="submit" tabindex="3" value="Submit" class="buttons" />
</label>
</form>

</div>
Reply With Quote
  #6 (permalink)  
Old Nov 20th, 2005, 14:44
benbacardi's Avatar
Highly Reputable Member
Join Date: Feb 2004
Location: United Kingdom
Age: 20
Posts: 611
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to benbacardi Send a message via Skype™ to benbacardi
Re: Add a form field

try putting "display:inline" into the form css?
Reply With Quote
  #7 (permalink)  
Old Nov 20th, 2005, 15:06
csa csa is offline
Up'n'Coming Member
Join Date: Nov 2005
Posts: 67
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Add a form field

Something happened!

It's still not pushing it onto the line above. See attached, I was aiming for it to be placed top right. At the moment it's under the phone number.

(benbacardi added brownie points!)

form#login {
background-color: #CCCCCC;
color: #000000;
border: 1px solid #ffffff;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
text-align: right;
margin: 0px;
background-image:url(images/searchback.gif);
display:inline;
Attached Images
File Type: gif top.gif (5.3 KB, 42 views)
Reply With Quote
  #8 (permalink)  
Old Nov 20th, 2005, 15:11
csa csa is offline
Up'n'Coming Member
Join Date: Nov 2005
Posts: 67
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Add a form field

Arrrh!!!! Just moved my form html code and this has worked. A bit of tidying up and this should do what I want, just need to find a keyword script now!

Thanks for all your help. It is very much appreciated, makes working on a Sunday worth the effort!
Reply With Quote
  #9 (permalink)  
Old Nov 23rd, 2005, 20:33
herkalees's Avatar
Highly Reputable Member
Join Date: Jul 2005
Location: Massachusetts, USA
Age: 87
Posts: 576
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to herkalees Send a message via MSN to herkalees Send a message via Yahoo to herkalees
Re: Add a form field

To shrink the height of the text box, try this in the css:

input.fieldcell {
height: 16px;
}

But mess around with the actual number to your liking.
Reply With Quote
Reply

Tags
add, form, field

Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
multiple form field calculation thenamenoonehastaken JavaScript Forum 2 Feb 21st, 2008 22:32
Form with confirm password field dhossai JavaScript Forum 28 Dec 16th, 2007 05:12
Number validation in form field Matc JavaScript Forum 2 May 26th, 2006 15:05
adding a field input to the subject in a form goatsalad PHP Forum 1 Feb 3rd, 2006 14:49
Newbie: changing the value of a field on form d9085 Databases 1 Dec 12th, 2005 18:08


All times are GMT. The time now is 00:30.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43