Computer Help and Spyware Removal Computer Help and Spyware Removal Computer Help and Spyware Removal Computer Help Forums Windows Startup Programs Database Spyware and Malware Removal Guides Computer Tutorials Uninstall Database File Database Computer Glossary Computer Resources
 

Welcome Guest ( Log In | Click here to Register a free account now! )



Register a free account to unlock additional features at BleepingComputer.com
Welcome to Bleeping Computer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.
Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

 
Reply to this topicStart new topic
> Nesting Tables
merthyrblue
post Jan 7 2008, 11:04 AM
Post #1


Member
**

Group: Members
Posts: 71
Joined: 20-October 05
Member No.: 37,947



Could someone please have a look at the HTML code below and tell me why the "contents" is pushing up into the "site navigation". Thanks in advance for any and all help! MB

<html>
<head>

<title>Nesting Tables</title>

</head>
<body>

<!-- container -->
<table width="600" cellspacing="2" border="1" align="center">
<tr><td>


<!-- table 1 -->
<table width="150" height="100" cellspacing="2" cellpadding="2" align="left" border="1">
<tr>
<td rowspan="2" align="center"><u>External Links</u></td>
</tr>
</table>

<!-- table 2 -->
<table width="450" height="30" cellspacing="2" cellpadding="2" align="right" border="1">
<tr>
<td align="center"><u>Site Navigation</u></td>
</tr>
</table>

<!-- table 3 -->
<table width="450" height="70" cellspacing="2" cellpadding="2" align="right" border="1">
<tr>
<td align="center"><u>Contents</u></td>
</tr>
</table>

</td></tr>
</table>

</body>
</html>
Go to the top of the page
 
+Quote Post
groovicus
post Jan 7 2008, 11:49 AM
Post #2


Hail Groovicus!
******

Group: Site Admin
Posts: 6,454
Joined: 5-June 04
From: Vermillion, SD
Member No.: 689



A couple of things; it would be helpful to know what sort of browser you are using, so that anybody else that is inclined to look can recreate what you are seeing. I use Firefox, and what I see may not be what you see. Also, indenting code makes it much easier to read and identify potential problems, and then using code tags to display it here so that the formatting is preserved. smile.gif

As far as things being scrunched, your problem is in your addition. You define an interior table with a width of 450 px, then you declare cellspacing of 2px, and a border of 1 px. The actual size of that table is then 456 px. The same problem exists with your other tables. They are not 150px, but rather 156px.

156 + 456 =612. That's bigger than 600 px (which you declared for the size of the enclosing table), and so will not fit properly inside your outer table.


--------------------
Go to the top of the page
 
+Quote Post
merthyrblue
post Jan 7 2008, 01:16 PM
Post #3


Member
**

Group: Members
Posts: 71
Joined: 20-October 05
Member No.: 37,947



Hi Groovicus
I was using Notepad and IE7 to build the nested tables. After taking onboard your suggestions the nested tables now displays exactly as i would want them to when viewed through Firefox. Unfortunately the old problem still persists in that the contents is still pushing up into the site navigation when viewed through IE7?
Go to the top of the page
 
+Quote Post
groovicus
post Jan 7 2008, 02:08 PM
Post #4


Hail Groovicus!
******

Group: Site Admin
Posts: 6,454
Joined: 5-June 04
From: Vermillion, SD
Member No.: 689



IE may be adding some extra padding or margin. I am not on a Window's system at the moment, so I can not check, but try increasing the size of the outer table to 650 or something just to see what happens. Alternatively, remove the size constraint from the outer table all together. In Firefox, the table will only be as large as it nees to be to contain the interior elements; not sure what IE does.

EDIT: JUst had a chance to look at it in IE...now I see what you are talking about. I would have to take a closer look.


--------------------
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 9th January 2009 - 01:49 AM


Advertise   |   About Us   |   Terms of Use   |   Privacy Policy   |   Contact Us   |   Site Map   |   Chat   |   Tutorials   |   Uninstall List
Discussion Forums   |   The Computer Glossary   |   Resources   |   RSS Feeds   |   Startups   |   The File Database   |   Malware Removal Guides

© 2003-2008 All Rights Reserved Bleeping Computer LLC.