Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Mar 2005
    Posts
    92
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Align to left/right problem

    Simple problem. I know I havent been using css, thats going to be fixed asap although I need alignment help. As seen below the text Player and Date/Time is aligned left and right, I would like to have $raden[0] to go left and [2] to right to match the above text. How could this easiest be done?

    PHP Code:
    <div align="center"> 
                <table border="0" id="table" width="200" cellpadding="2" bordercolorlight="#3E3854" bordercolordark="#3E3854"> 
                    <tr><th colspan="3" bgcolor="#c1c1c1"><? echo $class?></th></tr> 
                    <tr> 
                        <th align="left"> 
                            <p><font face="Verdana">Player</font></p>
                        </th> 
                        <th align="right"> 
                            <p><font face="Verdana">Date/Time</font></p>
                        </th> 
                    </tr> 
                    <?php 
                    
    while($raden mysql_fetch_row($result))
                    {
                        echo 
    '<tr><td>',$raden[0],'</td><td>',$raden[2],'</td></tr>';
                    }
                    
    ?>
                </table> 
            </div>

  • #2
    New Coder
    Join Date
    Jun 2006
    Location
    Sweden
    Posts
    49
    Thanks
    0
    Thanked 3 Times in 3 Posts
    PHP Code:
    echo '<tr><td style="text-align: left">',$raden[0],'</td><td style="text-align: right">',$raden[2],'</td></tr>'

  • #3
    New Coder
    Join Date
    Mar 2005
    Posts
    92
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Nicklas
    PHP Code:
    echo '<tr><td style="text-align: left">',$raden[0],'</td><td style="text-align: right">',$raden[2],'</td></tr>'
    Thank you. That was embarrasing to ask for :/


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •