CSS vs Tables for a layout

admin

Administrator
Staff member
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..........<!-- m --><a class="postlink" href="Lanhttp://www.hotdesign.com/seybold/index.htmlThank">Lanhttp://www.hotdesign.com/seybold/index.htmlThank</a><!-- m --> 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?........<!-- m --><a class="postlink" href="Lanhttp://www.w3schools.com/css/">Lanhttp://www.w3schools.com/css/</a><!-- m -->
<!-- m --><a class="postlink" href="http://www.bluerobot.com/web/layouts/">http://www.bluerobot.com/web/layouts/</a><!-- m -->
<!-- m --><a class="postlink" href="http://www.w3.org/Style/CSS/learningMy">http://www.w3.org/Style/CSS/learningMy</a><!-- m --> recommendations are in my sig below.This is a good reference that points to other references: <!-- m --><a class="postlink" href="http://www.roderickhoward.com/cssdirectory/I">http://www.roderickhoward.com/cssdirectory/I</a><!-- m --> think that css for many websites is better, because the css codes I just happen to think look nicer, and some of them you can combine with Javascript codes to creat neat clips and flash banners etc... The problem with css however is the 3 part codes for doing certain things, sometimes doing more than one image causes a probelm with using the css layout code to divide the page and a few other codes, creating a mess, simply cause you can't move it for part of another code being between it and the ending tag, this can creat a lot of probelms, but easy to fix, just be sure to know if the css is what is best, if you can't use the code, go for a short code of something else to do the same thing.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.My recommendations are in my sig below.


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:

<!-- m --><a class="postlink" href="http://www.alvit.de/handbook/">http://www.alvit.de/handbook/</a><!-- m -->

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:

<!-- m --><a class="postlink" href="http://www.csszengarden.com">http://www.csszengarden.com</a><!-- m -->

It was looking through that site that finally convinced me that CSS layouts were worth it.
 
Back
Top