Web Hosting Talk







View Full Version : Issue with forms and cellpadding


Red Squirrel
01-05-2009, 09:03 PM
Not sure why, but the right hand side of form fields is not adjusting properly to the specified cell padding. See attachment to see what I mean.
This is the html portion of one of the fields:
<td class="tablecell1" style="text-align:left; vertical-align:left; ">
<input type="text" class="formfieldtext" value="1" name="acl_all" >
</td>
The tablecell1 class is as follows:
td.tablecell1 /* normal */
{
border: 1px solid #000000;
font-size:14px;
padding:2px;
}
And formfieldtext:
input.formfieldtext
{
border: 1px solid #000000;
font-family:courier;
width:100%;
background:#FFFFFF;
}
Also my doctype is as follows:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Anything in there that would cause the border not obeying the cellpadding for the right side?

ipseeker
01-06-2009, 05:06 AM
input.formfieldtext
{
border: 1px solid #000000;
font-family:courier;
width:100%;
background:#FFFFFF;
}
I think it is the CSS code highlighted that causes your problem.

HivelocityDD
01-06-2009, 01:45 PM
Yes ! You can make it pixel size (100px) instead of 100%

Red Squirrel
01-07-2009, 04:39 AM
I want it 100% though, as it needs to span the whole cell (which can be any size - this is dynamicly generated).
I just don't want to overlap past the cell, which is what it seems to be doing slightly.
I did the same here and it works ok: http://squirrelbbs.iceteks.com/forums/index.php?act=l
Just cant seem to figure out what is different, though I have not touched SBBS in years. One day... lol

Red Squirrel
01-22-2009, 11:07 PM
Hmm interesting, if I remove the doc type, it fixes the problem.
I also noticed one of my older sites uses this doctype which seems to not cause this problem:
<b><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"></b>
Would there be other issues with using this doctype? Since if not, that will be my fix to the weird border issue.

Christina
01-24-2009, 06:02 AM
Hmm interesting, if I remove the doc type, it fixes the problem.
I also noticed one of my older sites uses this doctype which seems to not cause this problem:
<b><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"></b>
Would there be other issues with using this doctype? Since if not, that will be my fix to the weird border issue.
As long as it validates......shouldn't be a problem :)
http://24ways.org/2005/transitional-vs-strict-markup