5 Replies Latest reply on Nov 6, 2015 1:53 PM by ElizabethGailLittle

    How do I get text centered in a table cell?

    ElizabethGailLittle Level 1

      I have a table displaying photographs with captions in the row beneath.  Nothing I do gets the text centered.


      I created a table class with text alignment centered, and a td class with centered text.  My code includes <td align="center">......</td>  My text is still left-aligned.


      This is the relevant code:




         for ($i=1; $i <= $Cols; $i++)


         $ShowName="<span class='BlueHdr' >".$AryName[$i];


        <td align="center"><?php echo $ShowName; ?></td>


         }  # printed one row of names



      I'm running OS X El Capital 10.11.1.