Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Can You Put Tables Inside Of Tables?
KansukeKojima
post Dec 16 2007, 10:46 AM
Post #1


Privileged Member
*********

Group: [HOSTED]
Posts: 524
Joined: 13-October 06
From: Alberta, Canada
Member No.: 31,584



Well... could you? Specifically I mean can you place a <table> tag in a <td></td> tag which are already parts of tables.... if so, how do you go about doing it?

Go to the top of the page
 
+Quote Post
heavensounds
post Dec 16 2007, 11:10 AM
Post #2


Super Member
*********

Group: [HOSTED]
Posts: 496
Joined: 15-March 05
Member No.: 4,538



Yes, as far as I know this is possible and works ok - most of old sites, which did not use CSS for the layout of the page, all used nested tables or tables inside tables to create a layout.

You should know that tables are not the most preffered method of creating layouts, because they are very hard to maintain and there are also other bad sides of doing that.

If you want to create a good layout, learn CSS or cascading style sheets, because it really is worth it. Plus the concept is actually very simple once you get used to it...

Yeah, I almost forgot..how you do it (if you want to stick with nested tables):

CODE
<table>
  <tr>
    <td>
      <table>...</table>
    </td>
  </tr>
</table>


This post has been edited by heavensounds: Dec 16 2007, 11:13 AM
Go to the top of the page
 
+Quote Post
KansukeKojima
post Dec 16 2007, 11:17 AM
Post #3


Privileged Member
*********

Group: [HOSTED]
Posts: 524
Joined: 13-October 06
From: Alberta, Canada
Member No.: 31,584



Alright haha, thanks...

By the way, I know how to use CSS, but .... I don't have the expierience or skill to create a template to use yet, I use css in conjuction with my tables... Its mostly basic css............ I should probably practice that.....
Go to the top of the page
 
+Quote Post
techclave
post Dec 16 2007, 01:37 PM
Post #4


Super Member
*********

Group: [HOSTED]
Posts: 331
Joined: 28-August 06
Member No.: 29,048



yeah you can very well use a nested table.

by the way heavensounds is right. CSS is a far better alternative to styling.

good luck!
Go to the top of the page
 
+Quote Post
galexcd
post Dec 18 2007, 02:47 AM
Post #5


Define:EVIL PROGRAMMER (ē'vəl prō'grăm'ər)- n. An organism that converts caffeine into evil software.
*********

Group: [HOSTED]
Posts: 974
Joined: 25-September 05
From: The dungeon deep below the foundation of trap17
Member No.: 12,251



Yes of course you can... I use nested tables for a lot of stuff. Not a big fan of div layers and I believe css should be for setting colors and styles and stuff not actually constructing the whole template with it. I would use colspan and rowspan because that way i would be able to do everything I could do with a nested table except do it all with one table, but I've found firefox gets very confused when you get a little too excited with it. Almost all of my layouts that i try to do with one table with the help of colspan and rowspan looks great in safari, camino, and *gulp* (as much as I hate to say it) IE, but firefox messes them all up. Sigh, I'm still on the search for the perfect browser...

This post has been edited by alex7h3pr0gr4m3r: Dec 18 2007, 02:48 AM
Go to the top of the page
 
+Quote Post
crazyfray
post Dec 18 2007, 06:28 PM
Post #6


Member [Level 2]
*****

Group: Members
Posts: 77
Joined: 11-November 07
From: London
Member No.: 52,835



Yes, you can, but it means you're damned for eternity tongue.gif

Bear in mind that tables for layout brings many other problems rather than just difficult to read code, such as broken layouts whenever either the user stylesheet or the browser stylesheet (which shouldn't, but is known to with some of the more cheeky browsers) overrides your 'borders=0'. If nothing else, try using Lynx (a popular screen reader) to 'hear' your site - not only is this how many partially sighted and all blind users interact with your sight, but it makes it clear how your code is semantically incomprehensible.

Also, if your code renders correctly in those browsers, and not Firefox (and more conspicuously, Opera) then you are relying on the incorrect display of those browsers. Not that there's anything wrong with catering for IE and its ~80% market share, but it's pretty well known that you can write valid xhtml (even transitional 1.0) according to the w3c specifications that IE cannot render correctly. If nothing else, as soon as you play with margins and padding you can bet your bottom dollar that IE has it wrong thanks to MS's flawed interpretation of the box model.

I'm sure you already knew that Alex, but it winds me up sometimes when people code for IE, and then moan about FF and Opera...almost as much as people that spout standards-compliance on one hand, and then code for IE (not that you were doing either of those smile.gif ).

Anyway, I've fallen off topic. Tables are superb for displaying data, and are unfortunately being avoided by many for this thanks to the general bad press they get for layouts. However, that doesn't change the fact that using them for layout is bad practice, and getting into the form/function separation that CSS should teach you is a good habit for the long term. I think this is relevant, because the majority of situations I've seen where nested tables are used are cases where a table shouldn't be used at all - your table either needs additional columns/rows which are 'joined' by col/rowspan as Alex pointed out, or you should have just the data you want to nest in a table located within a div.

That's my 2 cents - I do appreciate that the jury is still out on table usage, but I'm not a big fan - I'm sure it can be done well, but not as easily once someone knows an equivalent level of CSS.
Go to the top of the page
 
+Quote Post
KansukeKojima
post Dec 18 2007, 07:01 PM
Post #7


Privileged Member
*********

Group: [HOSTED]
Posts: 524
Joined: 13-October 06
From: Alberta, Canada
Member No.: 31,584



Thanks for your opinion... I was only planning on using nested tables for my portfolio... so when the page loads, the image is displayed with the text how I wanted it.... but not for my layout...

Also, for the next version of my website, I'm looking towards a css layout... I'll have to practice how to set it up though...

This post has been edited by KansukeKojima: Dec 18 2007, 07:23 PM
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Highlight Tables On Mouseover(3)
  2. Html, Css, Tables...(10)
  3. Question About Tables!(13)
  4. Tables Invading Space(3)
  5. Advanced Html Frame Tag(3)
  6. Help With Tables Please(4)


 



- Lo-Fi Version Time is now: 20th July 2008 - 08:20 PM