CSS VS tables
Moderator: General Moderators
CSS VS tables
Does a CSS layout take a considerable amount more time to load than say a layout with tables? The reason I ask is that one of my pages is purely a CSS layout using <div>'s and a stylesheet. After optimizing the PHP code in it I find that it still takes a while to load where as my pages using tables for layout loads considerably faster with more queries and php in it.
or... does my computer just suck?
or... does my computer just suck?
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
but it seems to be more resource hungry on my end when I view it. =/ I don't know. Maybe my php isn't optimized as well as I think it is.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Tables render slower than CSS based layouts.
Tables are harder for screen readers to read than CSS based layouts.
CSS based layouts *can* use less bandwidth (with well-structured stylesheets)
If it really is because you're using CSS the only thing I could think of is lots of repeated inline CSS making the page size larger and therefore the bandwidth use higher. Can't think of anything else
Tables are harder for screen readers to read than CSS based layouts.
CSS based layouts *can* use less bandwidth (with well-structured stylesheets)
If it really is because you're using CSS the only thing I could think of is lots of repeated inline CSS making the page size larger and therefore the bandwidth use higher. Can't think of anything else
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
I worded that badly. What I should have said was using tables makes it harder for people who use screen readers to read your content.patrikG wrote:That's interesting. Why is that?d11wtq wrote:Tables are harder for screen readers to read than CSS based layouts.
I tried to think of a reason why that would be, but nothing comes to mind.
Now that I can give a reason as to why
CSS based layouts are almost always cleaner and if you view the source code you can practically read the material in the order it flows on the page itself....
The source code used in tables in somewhat more randomly ordered. That said.... you can write bad CSS and have everything structured in a complete mess.
I personally make a point of laying my CSS source out so that the textual content flows the way it does on the page when rendered
I think you stumbled onto your answer. I suspect its not the output that is the source of the slowdown - its probably the process to create it.scrotaye wrote:but it seems to be more resource hungry on my end when I view it. =/ I don't know. Maybe my php isn't optimized as well as I think it is.
Try taking the output, saving it as a seperate file, and compare it to similar output with tables, saved as a seperate file. ie, take php out of the equation. I'd be willing to bet that the css site is faster or at least close to the tables page. Then you'd know it was something in the php code causing the resource concern, and we could work to help you improve it.
Also, if by some odd chance you find that interesting exception to the rule where the css style version is honestly larger (and I definitely think its possible), then share it, and we can see if there are areas of improvement possible.
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: CSS VS tables
Thats impossible...your missing something...scrotaye wrote:Does a CSS layout take a considerable amount more time to load than say a layout with tables? The reason I ask is that one of my pages is purely a CSS layout using <div>'s and a stylesheet. After optimizing the PHP code in it I find that it still takes a while to load where as my pages using tables for layout loads considerably faster with more queries and php in it.
or... does my computer just suck?
Tables require a tremendous amount of recursion to render 100%...whereas CSS is pretty striaght forward...
look into it again