Jump to content

Checkbox won't center in <td>


bulrush

Recommended Posts

PHP 2.11.10

 

I display arrays of controls in tables on a lot of my screens. There are often multiple items related to one part number. Sometimes I want to display a checkbox in this table and center it. But the checkbox won't center. Here is my code:

	$s='<tr><td><input type="text" id="txtBid[]" name="txtBid[]" size="5" '.
	     'value="'.$bid.'" readonly />';
	$s.='<td><input class="requiredfield" type="text" id="txtBrand[]" name="txtBrand[]" '.
	     'size="40" maxlength="25" value="'.$b.'" />';
	$s.='<td><input class="requiredfield" type="text" id="txtNumgrades[]" '.
	    'name="txtNumgrades[]" '.
	    'size="4" maxlength="4" value="'.$numgrades.'" />';
[b]    	$s.='<td halign="center"><input type="checkbox" value="1" name="chkPnoverride[]" ';
    	if ($override==1)
    		{
    		$s.='checked="checked"';
    		}
    	$s.='/>';[/b]

Link to comment
https://forums.phpfreaks.com/topic/210860-checkbox-wont-center-in/
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.