• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

HTML Tables

hpkeeper

Diamond Member
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~
 
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
 
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>
 
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.
 
Back
Top