css vs tables(whats good and whats not)

liunx

Guest
Many topics have been brought up on the board about css being much better than tables in html, because tables were made simply for display tabular data, and nothing more. Although this has been stated many times, i do have a few questions on the subject.

First of all, for a page like this (<!-- m --><a class="postlink" href="http://www.macloo.com/examples/index.htm">http://www.macloo.com/examples/index.htm</a><!-- m -->), would it be fine to use tables to display the submenu's, since it isn't using tables for the layout, but for the navigation, or should css still be used?

Also, is it fine to use tables to display images, or should css be used here too?

Thanks,

-BrendanSemantically those are lists.When you get to wondering what tag should I use for this? Just think, what kind of data is this?

In your example you have a list of links, therefore you should use an unordered list to mark them up. (They are not an ordered list because you can put them in any order and it won't matter).
If you had a list of instructions that needed to be carried out in a particular order then you would use an ordered list.

When you have some text on a page you would mark that up as a paragraph.

When you have an image on a page you would use an img tag (why do you want to use a table for that?) although in future I think that object tags will be used instead of img tags, which I don't really agree with.Nobody probably cares what I think. But I think that nothing is wrong with using tables. People say there should be used only to display tabular data.....Well all the images and crap for the layout is data. I also think it is just easier for when you slice an image up. But CSS is good.

<!-- w --><a class="postlink" href="http://www.madddidley.comOriginally">www.madddidley.comOriginally</a><!-- w --> posted by madddidley
Nobody probably cares what I think. But I think that nothing is wrong with using tables. People say there should be used only to display tabular data.....Well all the images and crap for the layout is data. I also think it is just easier for when you slice an image up. But CSS is good.

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

There are many advantages to using CSS instead of tables. Smaller file size means less bandwidth cost and faster loading pages, both big issues for high traffic sites. Plus it's a hell of a lot easier to modify a CSS based site than it is a table based site.

It's not just a question of what should you use semantically for design, you should also question the benefits of one over the other.Originally posted by madddidley
Nobody probably cares what I think. But I think that nothing is wrong with using tables. People say there should be used only to display tabular data.....Well all the images and crap for the layout is data. I also think it is just easier for when you slice an image up. But CSS is good.

<!-- w --><a class="postlink" href="http://www.madddidley.com">www.madddidley.com</a><!-- w -->
Those who have not learnt any other tools think that hammer is the easiest one to use for all carpentry needs... :rolleyes:

And "images and crap" are not dataOriginally posted by TomDenver
There are many advantages to using CSS instead of tables. Smaller file size means less bandwidth cost and faster loading pages, both big issues for high traffic sites. Plus it's a hell of a lot easier to modify a CSS based site than it is a table based site.

It's not just a question of what should you use semantically for design, you should also question the benefits of one over the other.

Well, couldn't agree more. :)

I had a page that was based on "good old" HTML - i.e. lots of nested tables without any CSS, file size was 70 kb. After I converted the page to strict HTML 4.01 and an external CSS file, file size went down to 26 kb for the exact same presentation. CSS file was 15 kb and now available for the next page of tables - plus, I can now change appearance of ALL pages with tabular data by adjusting one file.Originally posted by confused again
Also, is it fine to use tables to display images, or should css be used here too?
Images should be displayed via img tags only if the image directly pertains to the content, i.e. a picture of a product to go along with it's desciprtion. If the graphics are merely decorative, then use nested DIVs and background images.

Example: <!-- m --><a class="postlink" href="http://mjw.cmich.edu/The">http://mjw.cmich.edu/The</a><!-- m --> problem I had using css I the screen resolutions. How do you get your layout to be centered no matter what screen resolution? All my "images and crap" look good one way then crappy the next.


<!-- w --><a class="postlink" href="http://www.madddidley.com">www.madddidley.com</a><!-- w -->"You having problem with CSS" is not the same as "CSS having problems" :D :D :D
.... where was that link to my rant ...
... here we go:
<!-- m --><a class="postlink" href="http://www.webdeveloper.com/forum/showthread.php?s=&threadid=30383I">http://www.webdeveloper.com/forum/showt ... did=30383I</a><!-- m --> think css is great! I just don't especially like it for layouts all the time. I guess I'll never learn.




<!-- w --><a class="postlink" href="http://www.madddidley.comOriginally">www.madddidley.comOriginally</a><!-- w --> posted by toicontien
Example: <!-- m --><a class="postlink" href="http://mjw.cmich.edu/">http://mjw.cmich.edu/</a><!-- m -->
toicontien

From this page: <!-- m --><a class="postlink" href="http://mjw.cmich.edu/accessibility.html">http://mjw.cmich.edu/accessibility.html</a><!-- m -->

Resizing text

Internet Explorer users with Microsoft Windows: Click on the "View" menu and click on "Text Size." Select the text size that best suits your needs.

Have you tried to press "Ctrl" down whilst scrolling the wheel on a wheel mouse? Works on your OS, therefore also on all browsers. :)Well not with that 'tude you won't. If you put your mind to it and learn your stuff you can make almost anything with CSS, except most soft drinks.Originally posted by philaweb
toicontien
Have you tried to press "Ctrl" down whilst scrolling the wheel on a wheel mouse? Works on your OS, therefore also on all browsers. :)
I never tried that before. Handy. Thanks!
 
Back
Top