how do i get table to show in middle of page

Discussion in 'PHP' started by dougvcd, May 16, 2007.

  1. #1
    this is what i have at the moment and table shows on left hand side i would like it to be center
    also if i want diff coloured text how is that done
    cheers
    Doug

    echo "<table border='1'>
    <tr>
    <p align='center' class='bodytext'>
    <th>parkname</th>
    <p align='center' class='bodytext'>
    <th>parklocation</th>
    <p align='center' class='bodytext'>
    <th>caravandetails</th>
    </tr>";while($row = mysql_fetch_array($result))
    {
     echo "<tr>";
      echo "<td>" . $row['parkname'] . "</td>";
      echo "<td>" . $row['parklocation'] . "</td>";
      echo "<td>" . $row['caravandetails'] . "</td>";
      echo "</tr>";
      }
      echo "</table>";mysql_close($con);
    PHP:
     
    dougvcd, May 16, 2007 IP
  2. gfreeman

    gfreeman Peon

    Messages:
    40
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    <table border='1' align=center>

    "<td><font colour=purple>" . $row['parklocation'] . "</font></td>";
     
    gfreeman, May 16, 2007 IP
  3. dougvcd

    dougvcd Peon

    Messages:
    267
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thanks that has solved most of my probs now
    cheers
    Doug
     
    dougvcd, May 16, 2007 IP
  4. gfreeman

    gfreeman Peon

    Messages:
    40
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    colour should be color ...

    (I'm a Brit in Canada - gimme a break!)
     
    gfreeman, May 16, 2007 IP
  5. dougvcd

    dougvcd Peon

    Messages:
    267
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    no problem good buddy
    thanks
    Doug
     
    dougvcd, May 16, 2007 IP