HTML Tables

hpkeeper

Diamond Member
Jun 30, 2000
4,036
0
0
Hi, I'm trying to sort out the rats nest of a website that the last webmaster created. I'm not much better in way of that, but I am a fan of clean code that isn't written by microsoft frontpage... So rather than sort, I'm trying to recreate the site with a lot less jargon in the way.

I'm trying to set up a table with several tables within it.

I know I can create tables with several cells, but I want a border outside of the table, however I don't want any of the cells to have a border around them too.

By this I mean if i use the tag "<bordercolor="pickyourcolor">" it not only outlines the border (which is good) but it outlines the cells within the table (which is bad).

So I was thinking if there was a way I could create a big table with only one cell in it, I could have the border be on the outside, then within that one cell I could put other tables within it. Is this possible?

~ThE kEeP~
 

stevf

Senior member
Jan 26, 2005
290
0
0
why not use inline CSS for this.

kind of like this (working solely from memory here at work)

<sometag style="bordercolor:black; bordersyle:solid">

this should allow you to specify which cells you need.

You will probably also get people telling you to not use tables for whole page layout and I mostly agree with that, but this should work for you
 

skrilla

Senior member
Oct 22, 2004
833
0
71
A quick fix...

You could use CSS to get the table with the border only around the outside.

If your code is something like:

<table border="1" bordercolor="#ff0000" cellspacing="0" cellpadding="0">
...
</table>

Try this instead:

<table style="border: 1px solid red;" cellspacing="0" cellpadding="0">
...
</table>
 

ahurtt

Diamond Member
Feb 1, 2001
4,283
0
0
To answer your question, yes. Absolutely you can nest tables. I'm not going to go into whether or not I feel you should or should not do that as you did not ask that. I'm not going to offer possible alternatives you could use instead as I am sure that every other person who answers this thread will do that for me. Two of them already have. But probably none of them will just simply answer the question which you did actually ask to which the answer is, Yes. You can do that.