View Single Post
Join Date: Jan 2008
Posts: 3,752
Reputation: VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute 
Solved Threads: 491
Featured Poster
VernonDozier VernonDozier is online now Online
Senior Poster

Table cells have small gap between them that I want to get rid of

 
0
  #1
Jan 12th, 2009
Hi, I'm creating a maze game. The layout is basically a big 21 x 21 square, with 441 (21 times 21) smaller squares inside of it. Each square will be a different color, representing a wall, a character, a passage, etc., so I figured I'd make a 21 x 21 table. However, when I do so, there is a small gap between each cell where the white background shows through. I'd like all the cells to jut against each other with no gaps so that the white background cannot be seen between cells. Is this possible and if so, how? I took a screenshot (attached), which shows the thin white lines between cells that I would like to get rid of, and my code is below (simple 3 x 3 table with different colors for adjacent cells). It's hard to see with the small version, but if you make it full-size, you see the thin white lines I am trying to remove more easily. Thank you.

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  5. <title>Table Experiment</title>
  6. <style type="text/css">
  7. <!--
  8. body {
  9. background-color: #FFFFFF;
  10. }
  11. -->
  12. </style></head>
  13.  
  14. <body>
  15. <table width="600" height="600" border="0">
  16. <tr>
  17. <td bgcolor="#0000FF">&nbsp;</td>
  18. <td bgcolor="#FF0000">&nbsp;</td>
  19. <td bgcolor="#00FF00">&nbsp;</td>
  20. </tr>
  21. <tr>
  22. <td bgcolor="#FF0000">&nbsp;</td>
  23. <td bgcolor="#00FF00">&nbsp;</td>
  24. <td bgcolor="#0000FF">&nbsp;</td>
  25. </tr>
  26. <tr>
  27. <td bgcolor="#00FF00">&nbsp;</td>
  28. <td bgcolor="#0000FF">&nbsp;</td>
  29. <td bgcolor="#FF0000">&nbsp;</td>
  30. </tr>
  31. </table>
  32.  
  33. <p>&nbsp;</p>
  34.  
  35. </body>
  36. </html>
Last edited by VernonDozier; Jan 12th, 2009 at 3:45 pm.
Attached Images
File Type: gif TableExperiment.GIF (5.4 KB, 4 views)
Reply With Quote