PDA

View Full Version : Problems With Forms


brad
12-15-2005, 10:18 AM
Hi Every one,
<span style='color:red'>Whenever I create a form, the form takes more space then it has been alloted, They just don't fit in it. If I still fit the form in the anyhow in the space it looks ok, but while previewing it in IE it just takes more space and so matter below it shifts down and a gap is seen.
Now if I reduce the size of the text and the form elements using CSS if reduces much more and then a space is seen in the alloted area of the form. This space is seen in Dreamweaver while Editing and also while previewing in IE.</span>
Please help me

ramandeep
12-15-2005, 10:26 AM
Hi,
Please post a link or code!

davidj
12-15-2005, 10:56 AM
its the dreaded space making pixies who take form tags and add space dust

yes i have had many headaches with this one and im afraid you will have to live with it. I have found work -arounds but these are not solutions just acceptable design changes

try this..

make sure your <form> tag wraps around the table that holds the form not wrapping the fields

you can even (if using one form) drop everything, content, buttons, images inside the form tag

example


<HTML>
<HEAD>
<TITLE>pfm concept</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<link href="pfm.css" rel="stylesheet" type="text/css">
</HEAD>
<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>

<form name="form1" method="get" action="process_page.php">

content content content etc
notice that the form follows the <body> tag. This gives the form all the room it needs to breathe

remember to make sure the </form> is closed just before the </body>

domedia
12-15-2005, 12:42 PM
<form> always have default margins. It's supposed to be that way. If you want to change the margins around the form you can:
<form style="margin: 0; padding: 0;">
If you want to set a certain margin by pixel, relplace '0' with '3px' for example.

davidj
12-15-2005, 12:43 PM
you learn something new every day