PDA

View Full Version : expert weigh in on tables and floats needed.



lafflin
16 Jul 2007, 12:21 AM
I have read or heard in passing that there is alot to be gained from using floats instead of tables, and I think that everyone has heard that nested table structures will slow the loading of a page. Which brings me to my first question:
-If I'm not concerned with dial up users is nested tables really a concern? And what other if any advantages are there to trying to replace table strucures with with floats? It seems to me that it would restrict things a bit to me, but then I've never implemented a float yet.
-Second question, I have seen a floating float that actually scrolls down with the page. I don't mean a floating backgroung, but a float in the foreground. The example I am refering to only worked in IE (sorry, no link). Is this an attribute of the float tag? or is this a javascript snippet?

Anyone have a quality link on this?

Wickham
16 Jul 2007, 03:08 AM
The downloading of tables won't be noticeably longer for most webpages, they would have to be very long and downloaded on dial-up for any difference to be seen.

Floats for elements like divs, images and other elements gives much greater flexibility, it means elements can be put in very different positions instead of just having one cell on top of another or having lots of stacked or nested tables, so it creates neater, shorter code but it can be difficult to get them to do what you want. There is also a much greater variety of margins, padding, borders, etc. for each or any side of an element which is easier to control with CSS than with old table coding.

If something stays where it is on the screen while you scroll, so that the other content moves past it, then it probably has position: fixed which IE6 and older browsers don't support. If it moves down the page while you are not scrolling or doing anything, then it could be a flash image.

Use an online tutorial like:-
http://www.w3schools.com/ (very detailed)
or
http://www.wickham43.supanet.com/tutorial/introduction.html (an introduction).