CSS vs Tables for a layout
Okay everyone. As far as CSS goes I know some basics, but not much more than that. Since I've started reading here the past few weeks I get the impression that the general consencious is that I should use CSS instead of HTML tables for a layout.
My questions are:
1. Is it true that I should use CSS, and if so, why?
2. How does it work? I need to know how to do it. An explanation or link to a detailed tutorial would be helpful.
Thank you for the help everyone..........Lan
Thank you for the link. I think I can see where I might want to, but I still only know very basic CSS. Does anyone know of any good tutorials that can teach me more about CSS and layouts?........Lan
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
My recommendations are in my sig below.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." Brian W. Kernighan
This is a good reference that points to other references: http://www.roderickhoward.com/cssdirectory/
There is only one logical answer for this as Tables were made to hold tabular DATA but were used for holding layouts together while CSS can have things like classes to hold a layout together by using DIVS and then styling them to make a layout.
By taking the tables out of the page and using CSS you make the page source a lot smaller and faster loading. You avoid having related objects separated into separate table elements. You make it easier to add additional stylesheets for print, web readers, handhelds etc. Just to name a few of the most obvious benefits.
Originally Posted by ray326
I reccomand the book in Ray326's sig.
Bought it myself and it really helped me alot.
Also, check out all the CSS information available through:
CSS layouts can be frustrating at first when you're trying to learn them and you just keep thinking, "If only I was using tables, I would have this done already." But it's well worth it. I can't imagine trying to do a table layout now. Once you learn enough about CSS you realize that table-based layouts are seriously limited.
Oh, and if you need some inspiration for some truly incredible CSS layout tricks just browse through some of the designs at:
It was looking through that site that finally convinced me that CSS layouts were worth it.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)