bulrush Posted August 16, 2010 Share Posted August 16, 2010 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] Quote Link to comment Share on other sites More sharing options...
JasonLewis Posted August 17, 2010 Share Posted August 17, 2010 What is halign, there is valign and align. valign = vertical align align = horizontal align Quote Link to comment Share on other sites More sharing options...
bulrush Posted August 17, 2010 Author Share Posted August 17, 2010 I double checked the <td> element and you're right. Thanks. I thought I saw "halign" somewhere but I was wrong. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.