Web Design Web Design Forum
Registration is free! Here you can view your subscribed threads, work with private messages and edit your profile and preferences Calendar Find other members Frequently Asked Questions Search
Home Web Design

Convenient web based access to our favorite web design Usenet groups

web design reviews

This is Interesting: Free Magazines for Graphics designers and webmasters  





Pages (4): [1] 2 3 4 »   Last Thread  Next Thread
Author
Thread Post New Thread   

Where Is It Written That I Should Use CSS Positioning?
 

Jack Hughes




quote this post edit post

IP Loged report this post

Old Post  06-15-04 - 09:15 AM  
This argument has come up two or three times lately.

We have a web standards document at our company that say "Use valid
HTML 4; We don't recommend switching to DIV-based CSS-P for layout
just yet though, tables are a lot easier."

That's because we have a lot of developers who aren't ready to move to
CSS-P and DIVs just yet.

But I'm being told our policies were contradictory. If we're going to
use standards, then we should use CSS positioning not TABLE code.

But we _are_ using standards! We're using valid HTML with a DOCTYPE
and everything. We don't use the FONT tag (though even _that_ is still
valid in Transitional HTML, did you notice?) and all the formatting,
all the backgrounds and colors and images and fonts are in the style
sheet, not in the page.

What, after all, is the real difference between

--------  ------------------------  --------
|  TD  |  |          TD          |  |  TD  |
|      |  |                      |  |      |
|      |  |                      |  |      |
|      |  |                      |  |      |
|      |  |                      |  |      |
|      |  |                      |  |      |
|      |  |                      |  |      |
|      |  |                      |  |      |
|      |  |                      |  |      |
|      |  |                      |  |      |
--------  ------------------------  --------

and

--------  ------------------------  --------
| DIV  |  |         DIV          |  | DIV  |
|      |  |                      |  |      |
|      |  |                      |  |      |
|      |  |                      |  |      |
|      |  |                      |  |      |
|      |  |                      |  |      |
|      |  |                      |  |      |
|      |  |                      |  |      |
|      |  |                      |  |      |
|      |  |                      |  |      |
--------  ------------------------  --------

anyway? The content comes in the same order in the page, and if I
include a "skip to content" link that takes people to the centre TD,
who have I hurt?

Tables should only be used for Tabular content, I hear you say --
well, isn't the traditional layout tabular, in a way? A column of nav,
a column of content, a column of whatever on the right. They're in
three different categories. Are tables really only to be used for
statistics on the consumption of cabbage in East Berlin from 1993 to
1994?

I forgot my original question -- oh yeah, where is it written,
actually literally where in the W3 website or the spec is it written
that I must use CSS-P now or my code isn't using standards?

Because the woman who I was arguing with eventually just said "well,
you're going against the SPIRIT of it" and I said "I don't have a
Spirit Validator, just an HTML Validator".

Joking aside, what document _should_ my opponent have pointed me to -
where is "Thou Shalt Use CSS-P" written, who decreed it - or is it
just a cultural assumption made by modern web developers, a sibboleth?


Post Follow-Up to this message ]
Re: Where Is It Written That I Should Use CSS Positioning?
 

Brian




quote this post edit post

IP Loged report this post

Old Post  06-15-04 - 09:15 AM  
Jack Hughes wrote:

> This argument has come up two or three times lately.

Actually, in ciwah, it has come up far more than just two or three
times. Shame you didn't read those threads.

> We have a web standards document at our company that say "Use valid
> HTML 4;

That's suprising. Most companies are unaware of anything relating to
good authoring practices. May I ask which company this is?

> We don't recommend switching to DIV-based CSS-P for layout just yet
> though, tables are a lot easier."

I don't think tables are easier, but css positioning is not for the
faint of heart. Even if there were no bugs, it'd be hard, and there
are bugs, lots of them.

> But I'm being told our policies were contradictory. If we're going
> to use standards, then we should use CSS positioning not TABLE
> code.

As of 2004, CSS is the proper tool for presentation of web documents.
HTML was never intended as a desktop publishing language. Efforts to
hammer it into one, especially via HTML 3.2, failed, leaving us with
transitional HTML for "legacy documents" and CSS for a more sensible
approach.

> But we _are_ using standards! We're using valid HTML with a DOCTYPE
> and everything.

Someone is confused. It's either you, or whoever told you this. An
HTML document is valid if and only if it conforms to the syntax of a
particular doc type definition. Since tables are part of several HTML
versions, any document which uses tables for any reason will validate.

> What, after all, is the real difference between
>
> --------  ------------------------  --------
> |  TD  |  |          TD          |  |  TD  |
> --------  ------------------------  --------

This markup claims there is tabular data in one row, and that each bit
of data is related to the other bits in some way. Therefore,
user-agents must present the data in such a way that the data makes
sense. In the ascii art example you provided, the ua has chosen a
logical presentation of a table, with the columns presented
side-by-side, as one might find in a book.

> and
>
> --------  ------------------------  --------
> | DIV  |  |         DIV          |  | DIV  |
> --------  ------------------------  --------

A div element should contain some division of content; beyond that,
div elements are semantically meaningless. Thus, the contents of a div
element are not necessarily related to the contents of another, even
where such div elements are presented, via CSS, side-by-side, as in
your second ascii art example.

> The content comes in the same order in the page,

A table layout where the content "linearizes" is the less wrong way to
do things. Not abusing tables for layout is the right way to do things.

> if I include a "skip to content" link that takes people to the
> centre TD, who have I hurt?

Your mixing up several different issues. A "skip to content" link is
not related to table layouts, nor to validation.

> Tables should only be used for Tabular content, I hear you say --

Does this mean you *did* read those other threads? If so, why did you
feel the need to start yet another go-round?

> well, isn't the traditional layout tabular, in a way? A column of
> nav, a column of content, a column of whatever on the right.

Who says that layout is traditional? What makes a layout traditional?
Perhaps you mean it is popular at the moment? That may be true, but it
is also subject to change.

In any case, it is not a table merely because it is laid out with some
bits next to other bits. A magazine article may have a sidebar with a
short, related article. The presentation of the sidebard is not a
table. It is layout where the related article is presented in a column
next to the main article. One might also choose to present the short,
related article at the bottom of the page, or on the next page. This
does not affect reader comprehension.

A table, by contrast, must be presented in some way that allows the
reader to make sense of the data. One cannot remove one column from a
table, move it to the next page, and expect readers to make sense of it.

> Are tables really only to be used for statistics on the consumption
> of cabbage in East Berlin from 1993 to 1994?

Of course not. They're also to be used for presenting sales of Lee
Perry cds in London; pollution levels in Mexico City; films produced
in India, France, and the U.S.; etc.

> where is it written, actually literally where in the W3 website
> or the spec is it written that I must use CSS-P now or my code
> isn't using standards?

In the HTML 4 recommendation, of course.

http://www.w3.org/TR/html4/struct/tables.html

See the first section, "introduction to tables."

> the woman who I was arguing with eventually just said "well, you're
> going against the SPIRIT of it"

Abusing tables for their presentation is a violation of HTML...

> and I said "I don't have a Spirit Validator, just an HTML
> Validator".

...but such abuse of tables does not violate the syntax of the
language. The best article I've read on this topic is from J. Korpela:

http://www.cs.tut.fi/~jkorpela/html/validation.html


B. Pearson will be along shortly to try his best to confuse you with a
rant about the so-called history of html.

Good luck.

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/


Post Follow-Up to this message ]
Re: Where Is It Written That I Should Use CSS Positioning?
 

Markus Ernst




quote this post edit post

IP Loged report this post

Old Post  06-15-04 - 12:14 PM  
"Jack Hughes" <jac_hughes@yahoo.com> schrieb im Newsbeitrag
news:f403fd42.0406142052.5371a2e@posting.google.com...
> This argument has come up two or three times lately.
>
[...]
>
> I forgot my original question -- oh yeah, where is it written,
> actually literally where in the W3 website or the spec is it written
> that I must use CSS-P now or my code isn't using standards?

Äh - if you know the arguments, why do you ask again? You are free to use
whatever coding technique you feel comfortable with. You don't need the ok
of ciwah/ciwas regulars, do you?

This is neither about a "must" nor about religion, it is just essential to
know how things are intended to be by the people who developed them, and it
is great to know good arguments for and also against doing thins this or
that way. It just makes you free to decide which way you go and also it
gives you the ability to discuss this with your bosses, clients and
co-workers. So knowing about those issues makes you a professional. But it
is not necessary that you agree with all that is written here nor is it
necessary that anybody else agrees with your point of view.

--
Markus




Post Follow-Up to this message ]
Re: Where Is It Written That I Should Use CSS Positioning?
 

Andy Dingley




quote this post edit post

IP Loged report this post

Old Post  06-15-04 - 05:15 PM  
jac_hughes@yahoo.com (Jack Hughes) wrote in message news:<f403fd42.040614205
2.5371a2e@posting.google.com>...

> where is "Thou Shalt Use CSS-P" written

c.i.w.a.h

By a bunch of pinheads who only have the brains for one bandwagon, so
when they've jumped onto it, they can't accept any value in any other
way of doing it.

Understand what you're doing. Then make appropriate choices.

Blanket application of CSS everywhere is probably slightly better than
an equally consistent use of 1x1.gif, but neither is as good as doing
the right things, as circumstance demands.

Three column layout in CSS sucks, because float is dubious and so is
width or margin:auto. Go for the three column table, because it's
good, it's simple and it works. OTOH, a 5 column table because you
don't understand margins or padding isn't good.

If you work on authoring for mobile devices, you'll start to really
see benefits from dumping table-bloat.




We sometimes forget just how clued-up the readers of c.i.w.a.h are -
even the idiots. You'll be flamed hereabouts for the most trivial of
errors, yet out in the big world of corporate site building the level
of technical expertise and practice is still pitiful. I've got a
problem at the moment where I feed content form <corporate #1> to
<corporate #2> and they're cheefully stripping ampersand entities and
all sorts from the content, then wondering why I complain that it's no
longer valid HTML - "But it looks OK in my browser" they whine.


Post Follow-Up to this message ]
Re: Where Is It Written That I Should Use CSS Positioning?
 

Karl Groves




quote this post edit post

IP Loged report this post

Old Post  06-15-04 - 05:15 PM  
"Jack Hughes" <jac_hughes@yahoo.com> wrote in message
news:f403fd42.0406142052.5371a2e@posting.google.com...

>
> What, after all, is the real difference between
>
> --------  ------------------------  --------
> |  TD  |  |          TD          |  |  TD  |
> |      |  |                      |  |      |
> |      |  |                      |  |      |
> |      |  |                      |  |      |
> |      |  |                      |  |      |
> |      |  |                      |  |      |
> |      |  |                      |  |      |
> |      |  |                      |  |      |
> |      |  |                      |  |      |
> |      |  |                      |  |      |
> --------  ------------------------  --------
>
> and
>
> --------  ------------------------  --------
> | DIV  |  |         DIV          |  | DIV  |
> |      |  |                      |  |      |
> |      |  |                      |  |      |
> |      |  |                      |  |      |
> |      |  |                      |  |      |
> |      |  |                      |  |      |
> |      |  |                      |  |      |
> |      |  |                      |  |      |
> |      |  |                      |  |      |
> |      |  |                      |  |      |
> --------  ------------------------  --------
>

Actually, the comparison is

<table>
<tr>
<td></td><td></td><td></td>
</tr>
</table>

and

<div></div><div></div><div></div>

And when you get down to it, I'm 100% positive that your table is much more
complicated than that whereas the <div> based layout is not.

Making The Business Case For Web Standards
http://www.karlcore.com/articles/article.php?id=23

Karl





Post Follow-Up to this message ]
Re: Where Is It Written That I Should Use CSS Positioning?
 

Barry Pearson




quote this post edit post

IP Loged report this post

Old Post  06-15-04 - 05:15 PM  
Jack Hughes wrote:
> This argument has come up two or three times lately.
[snip]
> I forgot my original question -- oh yeah, where is it written,
> actually literally where in the W3 website or the spec is it written
> that I must use CSS-P now or my code isn't using standards?
[snip]
> Joking aside, what document _should_ my opponent have pointed me to -
> where is "Thou Shalt Use CSS-P" written, who decreed it - or is it
> just a cultural assumption made by modern web developers, a sibboleth?

The short answer to your question is "nowhere important". I believe that the
objectives are getting forgotten.

When designing "infrastructure", such as an operating system, or application
middleware, or the set of recommendations for the web, you had better design
it so that people using it can separate out lots of concerns. It is a good
idea to have a web where authors, and users, can handle different issues, in
different places, with different recommendations & technologies.

But that it not a requirement that those people actually *use* all those
different things in that way. That is up to them, or the people they are
answerable to. Or perhaps the law influences the decision.

The purpose of a web site is to communicate with the audience. The technique
s
used must be evaluated against that purpose. Do layout tables hinder the
communication, perhaps because of the user's technology? Or do they help, by
enabling the author to build an effective site faster? Do layout tables make
the pages inefficient? Will they prevent important change needed for future
communication? These questions can be answered.

Experts should be able to assist with the analysis. A problem is that some
people opposed to layout tables appear to believe their own propaganda! Here
are some example:

"Layout tables make pages bloated & inefficient". Do the sums. They add
perhaps about 25 bytes per item being positioned. So, using them to achieve 
3
columns may add about 75 bytes to the page. (*Bad* layout tables can be
dreadful! So can bad anything).

"Layout tables make your pages inaccessible". The Web Accessibility Initiati
ve
came to a different conclusion in April 1999, and this is no longer a useful
assumption. (The key is whether they linearise well. In fact, the
linearisation of tableless pages is also important).

"Layout table freeze your layout as it is". I've seen it said that if you us
e
a layout table to put your site navigation on the right, you are stuck with 
it
on the right. But here is a page that uses a simple layout table to put the
site navigation table on the right:
http://www.childsupportanalysis.co.uk/
And here is that page, with the same table, and just 2 additional CSS rules
(embedded in the <head> ). They put the site navigation on the left. No trick
s,
no script, just valid HTML 4.01 Strict & CSS2:
http://www.childsupportanalysis.co.uk/reversed.htm

A better approach to this topic would be to be more objective, to help autho
rs
answer their questions. If an author decides to go ahead with a layout table
,
then how can the author use a good layout table, not a bad one? (You are
unlikely to be able to change the page layout significantly if you start wit
h
a bad layout table).

It's only mark-up. It isn't sin!

--
Barry Pearson
http://www.Barry.Pearson.name/photography/
http://www.BirdsAndAnimals.info/
http://www.ChildSupportAnalysis.co.uk/




Post Follow-Up to this message ]
Re: Where Is It Written That I Should Use CSS Positioning?
 

Shawn K. Quinn




quote this post edit post

IP Loged report this post

Old Post  06-15-04 - 05:15 PM  
Jack Hughes wrote:

> This argument has come up two or three times lately.
>
> We have a web standards document at our company that say "Use valid
> HTML 4; We don't recommend switching to DIV-based CSS-P for layout
> just yet though, tables are a lot easier."

If your content actually *is* a table, as in something you could caption as
"Table 1" in a book, then yes, keep it in a table. Otherwise, it's abuse of
table markup.

> That's because we have a lot of developers who aren't ready to move to
> CSS-P and DIVs just yet.
>
> But I'm being told our policies were contradictory. If we're going to
> use standards, then we should use CSS positioning not TABLE code.

That's correct.

> But we _are_ using standards! We're using valid HTML with a DOCTYPE
> and everything. We don't use the FONT tag (though even _that_ is still
> valid in Transitional HTML, did you notice?) and all the formatting,
> all the backgrounds and colors and images and fonts are in the style
> sheet, not in the page.

Misusing <table> for a layout grid is just as unacceptable as misusing
<blockquote> as an "indent text command".

> What, after all, is the real difference between
>
> --------  ------------------------  --------
> |  TD  |  |          TD          |  |  TD  |
[snip]
> and
>
> --------  ------------------------  --------
> | DIV  |  |         DIV          |  | DIV  |
[snip]
> anyway? The content comes in the same order in the page, and if I
> include a "skip to content" link that takes people to the centre TD,
> who have I hurt?

The former is structurally inaccurate. Some browsing situations may also
need to handle tables differently from running text and text enclosed in
<div>. Your layout box disguised as <table> may well be treated like an
actual data table, even if you do not intend that.

> Tables should only be used for Tabular content, I hear you say --
> well, isn't the traditional layout tabular, in a way?

No, the structure of content doesn't change just because you want the page
layout to be a certain way.

> I forgot my original question -- oh yeah, where is it written, actually
> literally where in the W3 website or the spec is it written that I must
> use CSS-P now or my code isn't using standards?

http://www.w3.org/TR/html401/struct/tables.html#h-11.1

"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."

(The word "control" probably should have been "suggest" here.)

--
Shawn K. Quinn


Post Follow-Up to this message ]
Re: Where Is It Written That I Should Use CSS Positioning?
 

Neal




quote this post edit post

IP Loged report this post

Old Post  06-15-04 - 05:15 PM  
On 14 Jun 2004 21:52:02 -0700, Jack Hughes <jac_hughes@yahoo.com> wrote:
> The content comes in the same order in the page

Actually, no. With table layout I must have the left column, then the
center, then the right. With CSS layout I can make the page degrade to ANY
order.


Post Follow-Up to this message ]
Re: Where Is It Written That I Should Use CSS Positioning?
 

Alan J. Flavell




quote this post edit post

IP Loged report this post

Old Post  06-15-04 - 05:15 PM  
On Tue, 15 Jun 2004, Shawn K. Quinn wrote:

> (The word "control" probably should have been "suggest" here.)

"Propose" is perhaps a more neutral - and hence more generally
acceptable - term for it.

Anyway, why all this fuss about "positioning"?  For most purposes, a
bit of flexible sizing and judicious floating works well across a
range of browsers, and does little harm irrespective of whether it's
actioned or not.

Some of the attempts I've seen to position lumps of stuff out of the
flow, however, have failed miserably in real-world situations - all
too often resulting in substantive content getting hidden behind some
insignificant navigation menu or similar.  In web page design, often
enough, "less can be more" if the right choices are made.  No, I'm not
a graphic designer, don't look to me for demonstrations, but I know
what I've seen.


Post Follow-Up to this message ]
Re: Where Is It Written That I Should Use CSS Positioning?
 

Barry Pearson




quote this post edit post

IP Loged report this post

Old Post  06-15-04 - 05:15 PM  
Neal wrote:
> On 14 Jun 2004 21:52:02 -0700, Jack Hughes <jac_hughes@yahoo.com>
> wrote: 
>
> Actually, no. With table layout I must have the left column, then the
> center, then the right. With CSS layout I can make the page degrade
> to ANY order.

Not true (about the tables). There are various ways, for example using CSS2,
or the "table trick", of having content order different from visual order.

And with CSS layout, things can sometimes get restricted. For example, if I
want a footer below the rest of the content, I would typically use floats, n
ot
absolute positioning. And then I have to put things into the content in the
right order to get the floats to work. (This is especially a problem if one 
of
the columns is "remaining-width", because of a flexible-width layout, and
can't be floated).

With both techniques, once the content gets at all complicated, the wrapping
 &
nesting & sequencing of the top-level elements of the document tree become
important. In that sense, a table is "stereotyped wrapping & nesting".

--
Barry Pearson
http://www.Barry.Pearson.name/photography/
http://www.BirdsAndAnimals.info/
http://www.ChildSupportAnalysis.co.uk/




Post Follow-Up to this message ]
Sponsored Links
 





All times are GMT. The time now is 04:05 AM. Post New Thread   
Pages (4): [1] 2 3 4 »   Previous Last Thread   Next Thread next
Stylesheets archive | Show Printable Version | Email this Page | Subscribe to this Thread

Popular forums

Adobe Photoshop forum Macromedia Flash Web Site Design
Dreamweaver FrontPage forum
JavaScript Forum XML forum
Style Sheets VRML
Forum Jump:
Rate This Thread:

 

XML RSS Feed web design latest articles Syndicate our forum via XML or simple JavaScript

Web Design archive  Database administration help  


Top Home  -  Register  -  Control Panel   -  Memberlist  -  Calendar  -  Faq  -  Search Top