HTML - Nesting Tables
I know this can be messy from time to time, but I believe this is the best way to lay out my page.
This is for a report I'm producing. I have two columns on the left side of the information and the last two columns on the left that need to be visible at all times. There are a total of about 20 different columns. I have tried a few things but come to use three seperate tables, one on the left for the data that needs to be fixed there, one in the middle for data that can scroll and the last on the right for the other fixed data. I'm having trouble getting the table in the middle to scroll. Is this possible, and what code would help. The code involved is very lengthy currently, because I have the data in it. In the future the data will be generated by a seperate SAS program. Should I make this middle table an iFrame, or is it possible for it to scroll horizontally without using frames at all. Thanks for your help. Similar Tutorials<html> <body> <script language="javascript"> function toggleDiv(divid){ if(document.getElementById(divid).style.display == 'none'){ document.getElementById(divid).style.display = 'block'; }else{ document.getElementById(divid).style.display = 'none'; } } </script> <table width="100%" align="left" cellspacing="1" cellpadding="0" class=table_bdr> <tr > <Td height="33" width="13%" align="left">CC</Td> <Td height="33" align="left" width="21%">Company name </Td> <Td height="33" align="right" width="14%">Clients</Td> <Td height="33" align="right" width="17%">Col1</Td> <Td height="33" align="right" width="17%">Col2</Td> <Td height="33" align="right" width="18%">Col3</Td> </tr> <tr > <Td height="20" width="13%" align="left">AB</Td> <Td height="20" align="left" width="21%">Company1 </Td> <Td height="20" align="right" width="14%" id="ss_report_link"><a href="javascript:;" onClick="toggleDiv('mydiv1');">12</a></Td> <Td height="20" align="right" width="17%">37</Td> <Td height="20" align="right" width="17%">14</Td> <Td height="20" align="right" width="18%">46</Td> </tr> <tr> <td colspan="6"> <div id="mydiv1" style="display:block; margin:0 0 0 0; padding:0 0 0 0; background:#C0E8FF"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <Td height="21" align="left" colspan="3" style="padding-left:130px" id=""><a href="#">Client1</a></Td> <Td height="21" align="right" width="17%">5</Td> <Td height="21" align="right" width="17%">1</Td> <Td height="21" align="right" width="18%">9</Td> </tr> <tr> <Td height="20" align="left" colspan="3" style="padding-left:130px" id=""><a href="#">Client2</a></Td> <Td height="20" align="right" width="17%">37</Td> <Td height="20" align="right" width="17%">12</Td> <Td height="20" align="right" width="18%">52</Td> </tr> <tr> <Td height="20" align="left" colspan="3" style="padding-left:130px" id=""><a href="#">Client3</a></Td> <Td height="20" align="right" width="17%">22</Td> <Td height="20" align="right" width="17%">17</Td> <Td height="20" align="right" width="18%">34</Td> </tr> <tr> <Td height="20" align="left" colspan="3" style="padding-left:130px" id=""><a href="#">Client4</a></Td> <Td height="20" align="right" width="17%">2</Td> <Td height="20" align="right" width="17%">1</Td> <Td height="20" align="right" width="18%">8</Td> </tr> </table> </div> </td> </tr> </table> </body> </html> This is my page (I have 14 columns actually. So every col gets less width than this). In Child table if I enter some lengthy value for Client name For ex: 'Client11111111111111111111111111111111111111111111' Every Column is moving right side. I dont want that. How to do that. i was wondering if it is possible to nest ssi within each other... so like for this scipt i got from dynamicdrive.com for a drop down menu... is it possible to use ssi in side of ssi and it still work? Hey Guys, I want to have a square coloured grey and within that square I want another sqaure coloured gray. I want the layout to be fluid so if I expand or contract the browser the inner square will still maintain the same distance from the outer square. See the image below: I have tried and tried but I just cannot get it to work. I want to avoid using tables and stick to divs tags. Does anyone know how I can do this ? I've only been using HTML for a couple of weeks, so apologies if this is a silly question. My website has quite a few common parts (eg menu line and footer), and the way I've currently got it set up these are defined on every page, so any change has to be edited into every page. What I would like to be able to do is define my menu in a separate file and have each HTML page reference it. That way I can just change the one file and that will be reflected in each HTML page. Does that make sense ? I know that I could use frames, but would prefer to do it this way if possible. Thanks Hello, I've been looking at this problem for a few hours now and can't see what i'm doing wrong. I just want to nest 2 tables inside 1 row of another table. Problem can be seen and you can view source at http://www.lakesdt.com/testindex.html Can anyone tell me where i've gone wrong? I'm using Notepad++ so that can confirm all my <tr> and <td>'s seem to match up. Any help much appreciated! Also open to suggestions for a better way to implement this, and also as each link on the left will load a page in the right is there a neater way to do this without reloading the whole page again? Best regards, Matt Hi All, I am newbie with HTML, I am having difficulties in nesting the tables. I have 4 <TD> tags in a <Table> but somehow due to some nesting issues when i am inserting a table in my 3rd <TD> my 4th <TD> goes out of the table. Here goes my Code... ------------------------------------------------------------------------------------------------------- <HTML> <BODY> <table border=1 width="100%"> <tr> <td>1st TD</td> <TD>2nd TD</td> <td>3rd TD <table> <tr> <table> <tr> <td>Info</td> <td>S/O</td> </tr> <tr> <td><select><option>Info about Renting</option></select></td> <td><input type="text" style="width:70px"></td> </tr> <tr> <table width="50%"> <td></td> <td>ABC</td> <td>DEF</td> <td>GHI</td> <td>JKL</td> </table> </tr> <table> </tr> </table> </td> <td>4th TD</td> </tr> </table> </BODY> </HTML> -------------------------------------------------------------------------------------------------------- Please Help!!!... -Gagan I have a table which contains 1 row, and 2 cells within the row. One cell displays some text neatly centered. and the other an image. I've written some javascript to change the color of the cell when the mouse hovers above it. Nice...but How do I nest my table inside an anchor <a href=""> tag so that the visitor can click anywhere within the cell and be directed to the href? Ive nested the table inside a tag and it only worked in Mozilla & Opera, but Internet Explorer......need I say more? Please help? We probably all know that if we run our HTML through the W3C validator, it will inform us if we've illegally nested one element inside another (e.g. placing a div within a span). Likewise, it will inform us if we've placed an element on the page but haven't used the correct containing element (e.g using a br, but not placing it within a p). What I'm looking for is some kind of documentation or reference guide that I can use, so I don't have to do a Google search every time I want to know if I'm correctly nesting elements! I would have thought that this would be defined by the XHTML schema at http://www.w3.org/2002/08/xhtml/xhtml1-strict.xsd. While this schema does define all the elements, it doesn't define how they are allowed to be nested in one another. Where can I find the documentation that defines correct nesting of elements? It must exist somewhere... Hi Normally, when you have more than one table in your code, the tables will be placed one under each other. Example: <table> ... </table> <table> ... </table> When you want the tables to be placed next to each other, you need to set the align attribute. Example: <table align="left"> ... </table> <table align="left"> ... </table> BUT: When you do it like in the 2nd example (tables next to each other), in Firefox, the tables will wrap to a new line if there is no more space. In Internet Explorer, the tables will not wrap. The result is a horizontal scrollbar or "hidden tables". Why this? How can I make the tables wrap also in Internet Explorer as it does in Firefox? Is it possible with a special CSS definition or with a special DIV/SPAN tag? Thanks for your help praiser Hey everyone, I'm new to these boards. Somewhat a newbie at web design, but I know basics. I'm looking to put 2 tables adjacent to each other inside another table. My problem is I can't get the tables to line up the way I want them to. I'll post a picture of how I want it to look, how it looks now and my code. How I want it to look: How it looks now: I want the tables to line up at the top and re-size according to each other so they're always aligned at the top. Code: coming in next 2 posts hey everyone, pretty simple question i am supposing, how do i stop the text in my tables from wrapping to fill the space inside the cell. The text in each cell flows over into a second line, and I end up getting writing that has huge spaces between each word, to try and fill out the line. I still want two lines, just normal sized spaces between words if that makes sense... Hi, im relatively new to html and I need help with creating tables for making a proffesional site for a practice assignment. Iv'e attached an image of the way I would like the site to look... I also need help with one other thing, when the mouse pointer is moved over the buttons at the top id like them to display a drop down menu of sub categories. Thanks in advance Back in 2004, i created a site, with tables. Have no idea how I did it, someone must have helped me. I want to update that site and make the center section wider than the sides (the sides can be of equial width). The URL is http://www.ilovejesus.com/lot/awesomebks/news.shtml Can someonehelp me with this? I need the code from the beginning of the table to the end of that column, that is Column 1, (left side) back to top for Column 2 (center), back to top for Column 3 (right side) and to the bottom of that column. I would like the center column to be at least 2x as wide as the side columns. Tell me how to end the tables and begin the text which will be straight across page. Thanks. EDIT: Title is supposed to be "Tables or CSS" I know, I know - HTML Tables are the spawn of Satan - however, I have a tabbed content box made from html/css/js - when you click on a tab, the content (underneath) changes accordingly. My questions is, I will be having a static list, with the corresponding answers (to the data in the list) targetting from an Excel Driven database - don't ask me why, just what my boss wants... Here is what I have so far: Quote: <TABLE CELLPADDING="2" CELLSPACING="2"> <TR><TD>Sponsor ID:</TD><TD>FILLER TEXT</TD></TR> <TR><TD>Client Number:</TD><TD>FILLER TEXT</TD></TR> <TR><TD>Sponsor Name:</TD><TD>FILLER TEXT</TD></TR> <TR><TD>Brand Name:</TD><TD>FILLER TEXT</TD></TR> <TR><TD>Status:</TD><TD>FILLER TEXT</TD></TR> <TR><TD>Support Tier:</TD><TD>FILLER TEXT</TD></TR> <TR><TD>Sponsor Phone:</TD><TD>FILLER TEXT</TD></TR> <TR><TD>Support Phone Number:</TD><TD>FILLER TEXT</TD></TR> <TR><TD>Support Email Address:</TD><TD>FILLER TEXT</TD></TR> <TR><TD>Parent Name:</TD><TD>FILLER TEXT</TD></TR> <TR><TD>Misdirect Scripting:</TD><TD>FILLER TEXT</TD></TR> </TABLE> He wants the content separated in a "ruled" look, like Excel - however, I didn't know if it would be cool to just use HTML - or if there is another way to do this - It's not going out on the internet (it's going on our Intranet via SharePoint) so I'm not worried about conjunctions and standards (not using HTML tables), etc. Just need to know if there is another way to separate the info with a solid black line - horizontal/vertical between the cells - that looks better than an HTML table border. Thanks! I'm starting a forum here, and I really want to get it up soon. But I can't because I'm having trouble w/ the header. On the header there's supposed to be text on top of it, but it's not. It's on the side. Can anyone help? Thank you. Here's the code:
Code: <a name="top"></a> <table cellspacing="0" cellpadding="0" border="0" width="696px" align="center"> <tr> <td bgcolor="#ddeef7"> <table border="0" cellspacing="1px" cellpadding="6" width="100%"> <tr> <td width="74%" bgcolor="#ffffff"> <table border="0" width="100%" cellpadding="0" cellspacing="0"> <tr> <td valign="top" rowspan="2"><a href="index.php"><img src="./images/oxygen/logo.png" alt="Ne-YoFan.com Online Community" border="0" /></a></td></tr> <tr> <td align="right" valign="top"><font class="smalltxt">Last active: 14-6-2008 at 08:10 PM<br /></font></td> </tr> <tr> <td align="right" valign="bottom"><font class="smalltxt">Logged in as <a href="member.php?action=viewpro&member=Erika">Erika</a><br />[<a href="misc.php?action=logout">Logout</a> - <a href="u2u.php" onclick="Popup(this.href, 'Window', 700, 450); return false;">U2U</a> - <a href="memcp.php">User Control Panel</a> - <a href="cp.php">Administration Panel</a>]</font></td> </tr> </table> Hey htmlforum and members can someone help me out with a carousel for image *small_blank.png*..(just start me off) thanx... -tikki- PHP Code: <tr> <td colspan="3" rowspan="2"> <img src="imagesxx/small_blank.png" width="234" height="83" alt=""></td> <td> <img src="imagesxx/spacer.gif" width="1" height="74" alt=""></td> </tr> i have the script needed http://www.dynamicdrive.com/dynamici.../carousel2.htm Hello everyone. Im making a website for my company and i need a little help. I made a table and tried to put a fixed width on it so then I could put text in it. Problem is, -when i type with no spaces ex aaaaaaaaaaaaa the text just keeps going forever instead of dropping down to the next line Also Ive been having some other problems -if I zoom in to like 200% on IE my text doesnt stay centerd with the page, it stays centered with the screen -And if I zoom in really far in Fire Fox my background stays centered with the screen instead of the page I made the page using photoshop and exported as html to get me started so ill post the whole script. Its not a whole lot. --------------------------- <html> <head> <title>K2 Layout 3-0</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> body { background-image: url(images/bg2.jpg); background-repeat: repeat-y; background-position: center; background-color: #0d141e; } body,td,th { color: #FFF; } </style> </head> <body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <!-- Save for Web Slices (K2 Layout 3-0.psd) --> <center> <table id="Table_01" width="1024" height="225" border="0" cellpadding="0" cellspacing="0"> <tr> <td rowspan="4"> <img src="images/K2-Layout-3-0_01.gif" width="93" height="225" alt=""></td> <td colspan="6"> <img src="images/K2-Layout-3-0_02.gif" width="840" height="166" alt=""></td> <td rowspan="4"> <img src="images/K2-Layout-3-0_03.gif" width="91" height="225" alt=""></td> </tr> <tr> <td colspan="5"> <img src="images/K2-Layout-3-0_04.gif" width="714" height="1" alt=""></td> <td rowspan="2"> <img src="images/K2-Layout-3-0_05.gif" width="126" height="43" alt=""></td> </tr> <tr> <td> <img src="images/K2-Layout-3-0_06.gif" width="71" height="42" alt=""></td> <td> <img src="images/K2-Layout-3-0_07.gif" width="211" height="42" alt=""></td> <td> <img src="images/K2-Layout-3-0_08.gif" width="141" height="42" alt=""></td> <td> <img src="images/K2-Layout-3-0_09.gif" width="163" height="42" alt=""></td> <td> <img src="images/K2-Layout-3-0_10.gif" width="128" height="42" alt=""></td> </tr> <tr> <td colspan="6"> <img src="images/K2-Layout-3-0_11.gif" width="840" height="16" alt=""></td> </tr> </table> <table id="Table_02" fixed width="830" border="0" cellpadding="0" cellspacing="0"><tr><td> Text Here Text Here Text Here Text Here </td></tr> </table> </center> <!-- End Save for Web Slices --> </body> </html> -------------------- Any help at all appreciated Thanks Is there a way to put together tables so they look like this: I have a L shaped image that I want to put into a table as a whole rather than cut into to two oblongs. As I am not an expert I wondered if this would mean that the space surronding the L shapped image will not be accesble when place in the table.. I want to put txt into the recess against the right angle formed by the L I think that the <td><img src="Lshape"/></td > way that the table structure works that the L will have a rectangle around it and that this will prevent things butting close to it.. is there a way around it.. Apart from cutting the L shape into two pieces and putting a table within a table thanks Larry I am trying to slightly reduce the size of the left row on my pages at http://www.mustseedaily.com/. I want to grow the middle table slightly to the left, but I just can't figure out what to change. I have been puzzling over this for some time, and I can usually figure this stuff out, but this one has me baffled. The html is attached. Thanks for any help! |