1
THCowboy
HTML tables in php
  • 2005/7/19 2:18

  • THCowboy

  • Just popping in

  • Posts: 84

  • Since: 2005/6/28


I am trying to put some html tables in my php pages but the cells/rows end up having no borders. Is there a way to fix this?

Here is an example
http://tablehockeyheaven.com/findplayers/belarus.php

The code for the page is below.

Thanks, Warren


<?php
include("../mainfile.php");
include(
XOOPS_ROOT_PATH."/header.php");
$xoopsOption['show_rblock'] = 0;
?>
<html>
<body>



<h4>Find Other Players</h4>



<br />




<table border="1" width="100%" cellpadding="5">
 <tr>
   <td align="center" height="50" colspan="6"><img src="flags/belarus.gif" />
   <font color="#0000ff" size="6"><strong>Belarus</strong></font> <img src="flags/belarus.gif" />
   <br />To add your name to this list you must fill out the <a href="form.shtml">Find other Players Form</a></td>
 </tr>




    <tr>
     <td align="center" bgcolor="#f5f5f5" colspan="6"><font color="#ff0000" size="5">Vitebsk Region</font></td>
    </tr>
  
 <tr>
  <td align="center" width="10%"><strong>Prov</strong></td>
   <td align="center" width="10%"><strong>City</strong></td>
    <td align="center" width="20%"><strong>Name/Email</strong></td>
    <td align="center" width="20%"><strong>I play</strong></td>
   <td align="center" width="20%"><strong>I would like to play</strong></td>
  <td align="center" width="20%"><strong>Additional Info</strong></td>
 </tr>

 <tr>
  <td align="center" width="10%">Vitebsk Region</td>
   <td align="center" width="10%">Novopolotsk</td>
    <td align="center" width="20%">Andrei Kniaziuk <a href="mailto:knz@tut.by">knz@tut.by</a></td>
    <td align="left" width="20%">STIGA</td>
   <td align="left" width="20%">STIGA</td>
  <td align="left" width="20%"><br /></td>
 </tr>


 
</table>




</body>
</html>
<?
include(XOOPS_ROOT_PATH.'/footer.php');
?>

2
JMorris
Re: HTML tables in php
  • 2005/7/19 4:56

  • JMorris

  • XOOPS is my life!

  • Posts: 2722

  • Since: 2004/4/11


Looks like you've defined the border for the table, but not the cells, try adding the border attribute to the cells using CSS.

Example:
<td style="border:1px solid #333333;">Your content</td>

Hope this helps.

JMorris
Insanity can be defined as "doing the same thing over and over and expecting different results."

Stupidity is not a crime. Therefore, you are free to go.

3
THCowboy
Re: HTML tables in php
  • 2005/7/19 12:20

  • THCowboy

  • Just popping in

  • Posts: 84

  • Since: 2005/6/28


Thanks JMorris!

It works but I would have to add it to about 500 lines of
code. It seems that maybe the style.css over rides my table's code as shown in my first post? Meaning, normally all I need is to state the border size for the table and it makes the borders for the cells too.

Anybody else know why the cells don't have borders?

Thanks, Warren