HTML Tables?

I contructed a table in HTML. I am having a problem understanding colspan and rowspan. The following is my code. Why is there a space in the first column? Why is there that huge gap? Thanks for all responses. <table width="80%" cellpadding="0" cellspacing="0" border="5" bordercolor="blue"><caption align="top"><h1><font face="impact" color="red">COURSE TECHNOLOGY</font></h1></caption> <tr align="center" bgcolor="#6699CC"> <td></td> <td>About Us</td> <td>Contact Us</td> <td>Find Your Representative</td> <td>Book Store</td> <td>Support</td> </tr> <tr> <td>Our Catalog</td> <td colspan="5" rowspan="8"><img src="image.gif"></td> </tr> <tr> <td>Business and Professional Development</td> </tr> <tr> <td>Computer Concepts</td> </tr> <tr> <td>Databases</td> </tr> <tr> <td>E-Commerce</td> </tr> <tr> <td>Graphic Design and Desktop Publishing</td> </tr> <tr> <td>Help Desk</td> </tr> </table>

Public Comments

  1. Not an answer, but, if you don't need to represent tabular data, then just use CSS. The example you provided is a perfect case for CSS.
  2. 1. That space in the 1st column (of the 1st row) is caused by your <td></td> you entered just before "About Us"...do you see it? If you want it to have the"ingraved look then add " " inside the tags. 2. I am not sure about which "huge gap" you are referring to..If you are still referring to the 1st column/1st row then see #1...If you are referring to the gap seen at the bottom-right it is because of your "colspan/rowspan" you gave...It makes total sense that it would do that...If you dont want that then remove it and replace the missing portion wiht "<td></td>" for each col (should be 6 per row) with 8 rows
  3. First of all, why are you using a table? A table should be used for displaying tabular data only, not for menus or anything else. You don't use Excel to write your simple text documents, right?
Powered by Yahoo! Answers