Jump to content

hidden field spacing


freelance84

Recommended Posts

Another rather odd one:

 

Option 1

<tr><td colspan="2">
<form action="nrt-home-create-add-students.php" method="post">
<input type="hidden" name="c_n" value="$c_n[0]"/>
<input type="hidden" name="d_s" value="$row[2]"/>
<input type="hidden" name="d_f_1" value="$row[3]"/>
<input type="hidden" name="d_f_2" value="$row[4]"/>
<input type="hidden" name="d_f_3" value="$row[5]"/>
<input type="hidden" name="d_t" value="$row[6]"/>
<input type="hidden" name="d_g" value="$row[7]"/>
<input type="hidden" name="d_c_f" value="$row[8]"/>
<button id="button-submit_4" type="submit">Delete</button></form>$jj)  $row[2], $row[3] $row[4] $row[5]</td></tr>

 

Option 2

<tr><td colspan="2">
<form action="nrt-home-create-add-students.php" method="post">
<button id="button-submit_4" type="submit">Delete</button>
<input type="hidden" name="c_n" value="$c_n[0]"/>
<input type="hidden" name="d_s" value="$row[2]"/>
<input type="hidden" name="d_f_1" value="$row[3]"/>
<input type="hidden" name="d_f_2" value="$row[4]"/>
<input type="hidden" name="d_f_3" value="$row[5]"/>
<input type="hidden" name="d_t" value="$row[6]"/>
<input type="hidden" name="d_g" value="$row[7]"/>
<input type="hidden" name="d_c_f" value="$row[8]"/></form>$jj)  $row[2], $row[3] $row[4] $row[5]</td></tr>

 

 

Both of the above options contain hidden fields, a button and some text in on single table cell.

 

Option 1 has the submit button after the hidden fields.

 

Option 2 has the submit button before the hidden fields.

 

Option 1 produces a table with no space between the submit button and the start of the text IE and Firefox.

 

Option 2 produces the same table with a big space between the submit button and the text (it is also much bigger in IE than in firefox).

 

In this instance there is no problem in placing the hidden fields before the submit button, however I can foresee instances where I may have text before and after the submit button so this may cause a problem.

Is there some CSS styling to be done to the hidden fields or is there no way around this and should hidden fields always come before anything else?

 

(NB The attached .CSS has one form section in it telling forms to display inline)

Link to comment
https://forums.phpfreaks.com/topic/200684-hidden-field-spacing/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.