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] Link to comment https://forums.phpfreaks.com/topic/210860-checkbox-wont-center-in/ 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 Link to comment https://forums.phpfreaks.com/topic/210860-checkbox-wont-center-in/#findComment-1100050 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. Link to comment https://forums.phpfreaks.com/topic/210860-checkbox-wont-center-in/#findComment-1100242 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.