Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with table inside table

 
Alicia Logan
Greenhorn
Posts: 14
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

what i'am trying to achieve is creating a look and feel of a thin border line surrounding my inner table. For this, i have created one outer table which encompasses another table in its <td> as shown below:

<table bgcolor="#999999" width="400" border="0" align="center">
<tr>
<td>
<table bgcolor="#CCFF99" width="100%" cellpadding="2">
<tr>
<td></td>
</tr>
</table>
</td>
</tr>
</table>

The outer table has has bgcolor of gray while inner has green. Now can someone help me with the parameters of the inner table so that i have a very thin outer gray line surrounding my inner table. The line now is quite thick and looks bad.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't color the inner table green, just color the TD's of the outer table. Then you make the cellspacing for the outer (and only) table =1 and it all looks nice. Hopefully. I've done it like this a few times.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why don't you just assign a border and avoid using the second table?

Eric
 
Alicia Logan
Greenhorn
Posts: 14
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the help friends, but i found out the viable solution:

<table width="400" border="0" align="center">
<tr bgcolor="#999999">
<td>
<table bgcolor="#CCFF99" width="100%" cellpadding="2">
<tr>
<td></td>
</tr>
</table>
</td>
</tr>
</table>

Just using the bgcolor attrib for the <TR> of the outer table....this may help you in the future.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Tabless way:


Tableless is the way to go.
Eric
 
Alicia Logan
Greenhorn
Posts: 14
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Eric,

That was a good suggestion. Just wondering, what is your qualification?

Thanks again
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tables are meant for tabular data. They are "heavy" on browser rendering. Heavy means they take longer to render due to the way the browser has to handle them.

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic