|Nested Tables and Percentage Widths|
Nested Tables and Percentage Widths
Was wondering what happens if you have a parent table with percentage width, and a child table within one of the rows that has a hard coded length? Which one rules? Or do different browsers do this differently??
How do most people work? Do they just use hard-coded lengths all over?? Wew! That's about what I've decided to do!!
If the outer table is in percentages and the inner one is fixed, the outer table will adjust to the screen width and the fixed table will remain fixed. If the screen width is small than the fixed table, the outer table will not go below the fixed table. In reverse, if you use a fixed outer table with a percentage table inside, especially in Netscape, the inner table will attempt to push beyond the outside of the outer table.
That's a really long way of saying - it's safe to put a fixed table in a percentage table, but it's not always safe to put a percentage table in a fixed table.
I would say that most of the sites I've QA'd are fixed width. If a combination of both is used it is with a fixed width nested inside of a percentage width. I also work for the Federal Government, Canada, and the guidelines for all government internet sites is fixed width.
That's exactly what I decided to do! I'm trying to cut down on my nested tables, however, they are pretty cool if you understand how they work. From what I can tell, the browser renders the tables with hard-coded widths first, then fills in the tables that use a percentage for the width.
I have read that for 800X600 resolution, that if you keep your hard coded tables around 772 pixels in width, then you will not get a horizontal scroll bar. Some people try to keep the hard-coded widths around 752 to account for those users that keep the Microsoft toolbar open on the right hand side. But I really don't care about those people...
But that's what I'm doing, I have a parent table that surrounds my whole page, and it's width is 100%. Then I have child tables with hard-coded widths, paying careful attention to make sure that the widths of the rows, and the images within those rows do not exceed 772. So far it's working fine.
This is a great forum! Thanks for your help!!
fixed width tables nested in side parent tables with percentage widths, as the main table can expand or shrink to monitor resolution, but the nested table, is always the same, i would only consider other options if the nested table is massive (pushing past 500 pixels in width), due to some resolus still at 640*480, may force a once nice looking layout, into a terribly disfigured page.
The maximum I've gone with fixed widths is 780 with magin-left and margin-top at 0px. However, my tables are broken into two columns: 180 and 600 with the 180 being some navigation and announcements and the 600 being the primary content. I figure this way, anyone using a 640 resolution can scroll left/right once to concentrate on the area their interested in. I've had no complaints so far.
A note about 640x480 resolution... Virtually no one uses it anymore. Last I heard (from various market research companies) it was well under 10%. Logs at various websites I've desiged are showing under 5%.
Also, ya'll have probably noticed that pretty much every site put online withing the last 6 months is designed for 800x600. --In other words, 640x480 have to scroll on most sites these days, they don't mind or they would've bought a monitor that's bigger than, say, 13" by now ;-)
Basically the only reason to design for resolutions under 800x600 anymore is if you're designing for keyboarded handhelds ;-)