The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Putting a form inside a table data cell
eemorris
post Oct 14 2008, 11:49 PM
Post #1


Newbie
*

Group: Members
Posts: 15
Joined: 25-September 08
Member No.: 6,743



Hi,
I'm stuck on what is probably a very stupid problem, but I'd appreciate any advice!

I'm trying to add a form within a table:

<td width="146" valign="middle" class="style7">
<br />
Stay In Touch
<p align="left" class="style8">Our inventory goes fast. <br />
Be the first to know as <br />
our new homes become <br/>
available.<br />
</p>
<br />
<form id="form1" name="stayintouch" method="post" action="mailto:info@homesbytre.com">
<span class="style8">FIRST NAME </span><br />
<input name="firstname" type="text" size="19" />
<br />
<span class="style8">LAST NAME </span><br />
<input name="lastname" type="text" size="19" />
<br />
<span class="style8">EMAIL ADDRESS </span><br />
<input name="email" type="text" size="19" />
<br />
<input type="image" align="right" src="../TREimages/submitbuttonWhiteBkg.jpg" alt="Submit"/>
</form>
</td>


The style it references just modifies the font size and color. The problem I'm having is the Submit Buttom aligns to the right side of the <td> cell as opposed to the right side of the text boxes. I've tried adding padding on the right side, but that seems to cause problems between browsers. For example, adding an extra 20px to the right fixes it in Safari, but it needs extra padding in Firefox, and 20 is too much in IE. I have also included this in my CSS:

* {
margin: 0;
padding: 0;
}

So I don't think it's a problem with default values among the browsers. Here is the site it's referring to:
http://www.homesbytre.com/Untitled-1.html

Any ideas are extremely welcome!!
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Oct 15 2008, 09:19 AM
Post #2


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 18,353
Joined: 9-August 06
Member No.: 6



You could make the text inputs 100% wide (with CSS). I think that's the look you are going for anyway?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
eemorris
post Oct 15 2008, 09:34 AM
Post #3


Newbie
*

Group: Members
Posts: 15
Joined: 25-September 08
Member No.: 6,743



I thought about that, but it makes that particular td cell the form is in expand to fill up all of the white space not used by the other cells and then makes a gigantic text box across the entire middle of the page. Any other ideas?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Oct 15 2008, 09:41 AM
Post #4


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 18,353
Joined: 9-August 06
Member No.: 6



Does that really happen if you make the INPUTS 100% wide?

No, no ideas unless you show us the real code. Can you post the URL to a sample page?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
eemorris
post Oct 15 2008, 09:54 AM
Post #5


Newbie
*

Group: Members
Posts: 15
Joined: 25-September 08
Member No.: 6,743



I'm sorry, maybe I misunderstood what you meant. I tried changing the code to:

<input name="firstname" type="text" size="100%" />

for each of the text inputs. It stretched the column containing the form and shrunk the other columns in the same row. The link to the website is above, but here it is again:

www.HomesByTRE.com/Untitled-1.html

Thank you.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Oct 15 2008, 10:17 AM
Post #6


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 18,353
Joined: 9-August 06
Member No.: 6



No, with CSS. The size attribute can't use percent as it refers to a number of characters. Remove size altogether.

http://htmlhelp.com/reference/html40/forms/input.html
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 24th August 2019 - 08:07 AM