English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Identify a situation where laying out a web page exclusively in CSS without recourse to html table constructs was a good or recommended idea.

I am struggling to think of an example.

2007-10-22 02:10:03 · 5 answers · asked by Robert T 2 in Computers & Internet Programming & Design

5 answers

This is usually the case on large commercial sites because of 508 compliance, to allow accessibility issues to be resolved by alternate/user-supplied style sheets.







_

2007-10-22 02:40:00 · answer #1 · answered by SadButTrue 4 · 0 0

When the website has numerous pages that all have the same layout, but the layout will change is an instance. Using CSS to change the layout of a website means that instead of adjusting EVERY page, only the CSS file will need to be adjusted. Changing one file versus 55, for example, is always good. :)

2007-10-22 09:15:36 · answer #2 · answered by Anonymous · 1 0

Well, I've built templates completely in css, and they're just fine. Now granted, the CMS we use at work automatically inserts tables around content (Joomla, though the 1.5 beta doesn't I believe), but that's beyond my control. I've had to deal with inconsistencies between browsers, but there are fixes for that. Otherwise, I've had great success with all-css templates.

2007-10-22 09:19:29 · answer #3 · answered by Opal 6 · 0 0

Haven't done this lately, but how about presenting a page to a hand held device (PDA, cell phone, etc...) that has a limited capability browser? Some of the HTML tags may not be supported.

2007-10-22 09:13:41 · answer #4 · answered by Jim Maryland 7 · 1 1

I'm a little confused by your question. By "html table constructs" I assume you mean the practice of adding inline style declarations like so:



...instead of using something like .td { width: 50px; } in CSS? Because you can use a table-based layout that relies upon CSS if you were so inclined.

Anyway, to answer your question, here are a few examples of when using CSS and

tags was better than using HTML tables:

1) When we were charged with the task of making a site as accessible as possible via multiple platforms;

2) When we wanted to increase page load times and reduce bandwidth by using structured, semantic markup that separated behavior and design and was free of line after line of embedded tables featuring varying dimensions of a spacer image;

3) When we wanted to insure the pages got indexed properly by Google and others by using structured, semantic markup. Search engine spiders prefer pages to be structured in way to make it obvious what the point of a page is -- something that a web standards based layout accomplishes semantically with its proper use of common tags like

's and

's;

4) When we wanted to make site maintenance as painless as possible. On pages that demand complex visual design elements, it's a lot easier modifying text without having to traverse nested-table hell. Furthermore, by forcing the presentation and behavioral layers together, which it sounds like you're suggesting since you don't even use CSS to style your tables, the ability to make global style changes is gone. A client wants to change a table cell border color from gray to black? And that table exists on 1,500 html pages?

5) When we wanted to finish our projects on time (although I bet some developers who use tables exclusively are pretty fast).

6) When we wanted to make our code as forward compatible as possible. It's a lot easier to reuse/repurpose a standards-compliant document for other noble deeds because with a standards-compliant doc, you won't have to sift through lines of presentation markup code to get to content.

7) And finally, when we wanted to ensure that we presented ourselves as professional and capable as possible. Our clients are always wanting us to use whatever's the trendiest or most contemporary, and while that may not be the greatest reason in the world, it forces the front-end developers to stay on top of changes in the front-end technological landscape. Even if we wanted to urge a table-only based approach, as consultants we'd have to be able to say we could ultimately deliver it however they wanted it.

"Tables should not be used purely as a means to layout document content as this may present problems when rendering to non-visual media. Additionally, when used with graphics, these tables may force users to scroll horizontally to view a table designed on a system with a larger display. To minimize these problems, authors should use style sheets to control layout rather than tables." -- W3C (http://www.w3.org/TR/REC-html40/struct/tables.html)

2007-10-28 08:48:38 · answer #5 · answered by achtungbaby 3 · 0 0

fedest.com, questions and answers