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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.