Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

moving to html 4.01 strict//align="centre"

2 views
Skip to first unread message

Marek Stepanek

unread,
Dec 2, 2001, 11:14:33 AM12/2/01
to
Hello,


I am new to this list and frankly, I have not lurked for a long period. So
here it comes, please be indulgent (with my English too), this is a basic
question:

I am just moving for fun a page from HTML 4.01 transitional to strict. The
align="centre" is deprecated, and I am not seeing a good css solution to put
a block-element with reasonable means in the horizontal centre of the page.
How to replace correctly the align="centre" of the table-tag?

Only means I found is:

TABLE {
position: fixed;
left: 10%;
right: 10%;
}

if the table is intended of 80% width.

An other solution I found, was:

TABLE {
margin-left: auto;
margin-right: auto;
}


Would this also be the solution for <IMGages?

All this to replace a simple align="centre" in the table-tag. Is this not
overkill?

greetings from Munich, rainy here


marek

______________________________________________________________________
___PODIUM_INTERNATIONAL_//_the_embassy_for_talented_young_musicians___
_______Marek_Stepanek__mstep_[at]_PodiumInternational_[dot]_org_______
__________________http://www.PodiumInternational.org__________________
______________________________________________________________________

Jerry Muelver

unread,
Dec 2, 2001, 11:23:40 AM12/2/01
to
On Sun, 02 Dec 2001 17:14:33 +0100, Marek Stepanek
<ms...@podiuminternational.org> wrote:

>Hello,
>
>
>I am new to this list and frankly, I have not lurked for a long period. So
>here it comes, please be indulgent (with my English too), this is a basic
>question:
>
>I am just moving for fun a page from HTML 4.01 transitional to strict. The
>align="centre" is deprecated, and I am not seeing a good css solution to put
>a block-element with reasonable means in the horizontal centre of the page.
>How to replace correctly the align="centre" of the table-tag?
>

http://allmyfaqs.com/cgi-bin/wiki.pl?Center_with_CSS

---- jerry
--

Quiss

unread,
Dec 2, 2001, 3:54:57 PM12/2/01
to
Hello, Marek

>
> All this to replace a simple align="centre" in the table-tag. Is this not
> overkill?
>

Yes, it is :)
While there are some useful things that can be accomplished with style
sheets, I am now firmly of the opinion that they were invented by people
with too much time on their hands.
I don't feel any particular need to separate content from style, or to
replace my beloved center tag with endless lines of code that may or may not
work in certain browsers, depending on the time of day and the weather in
Idaho.
Unfortunately, someone saw fit to complicate matters and, from the looks of
things, we're going to have to follow suit.

Perhaps, if we wait long enough, someone will come up with something
simpler. I can't imagine that the average newbie web author (such as one
looking to just make a page for themselves), is going to slog through a code
that seems to have more exceptions and workarounds than rules. Judging by
the unbelievable popularity of Dreamweaver and other wysiwyg's, those people
aren't even prepared to learn HTML, never mind css. Good news for
Macromedia, I suppose....

servus,
C.
www.NerdsUnlimited.net

Fezboy!

unread,
Dec 2, 2001, 7:25:08 PM12/2/01
to

Quiss wrote:


> Unfortunately, someone saw fit to complicate matters and, from the looks of
> things, we're going to have to follow suit.
>


No, you can still write sloppy code and use deprecated tags. However,
you can't expect anyone to hand you a cookie for doing so.

> I can't imagine that the average newbie web author (such as one
> looking to just make a page for themselves), is going to slog through a code


As I cannot imagine someone just picking up Java over the weekend and
being able to generate a complex application with thousands of lines of
code. If you want to do something, you have to learn and practice and
work your way up to competence.


> that seems to have more exceptions and workarounds than rules.


The rules themselves are quite coherent and consistent. It is the
implementation of the rules by the jokers who design browsers that make
things difficult. Blaming CSS for these problems is like blaming the
dictionary when you misspell a word.

Judging by
> the unbelievable popularity of Dreamweaver and other wysiwyg's, those people
> aren't even prepared to learn HTML, never mind css. Good news for
> Macromedia, I suppose....


You are quite correct. And bad news for legitimate Web authors - which
I may or may not be at this time. $300 worth of software and a box of
clip art does not a web designer make. Just as a pocket full of tongue
depressors and a stethescope does not qualify you as a doctor, just as
the latest version of PC Lawyer does not qualify you to give legal
advice, just as. . . well you get the point. If this is a hobby, treat
it as such. If you're looking to pass yourself off as a web savvy
[whatever], you should probably take a little time to learn what it is
you are doing.


Maybe it's the lack of coffee and cigarettes today, maybe it's the
weather, maybe there is no excuse, but for chrissakes folks, if I have
to sit here and read another whiney post on how tough it is to work with
CSS and what a pot of excrement it is, I'm going to reach through this
screen and choke someone. No one ever promised you this would be easy.
Whoever lied to you and said anyone can design standards compliant
pages for the Internet without first having to apply yourself in some
minimal way was rooking you. Either silently go back to HTML 3.x and
kludge your way around the universe or pull up your trousers and do
something useful.

I'm not saying designing pages is tough. Heck, I do it for a living.
But then again, I took the time to read the W3C specs. I invested the
effort in checking out browser implementations. I took the time to
learn how to separate content from presentation and to be able to argue
knowingly as to why this is good idea. I'm no boy genius either, so I
know you can do it. Just freakin' apply yourselves people. Whinging in
a newsgroup isn't going to get you any closer to knowledge.

Grrr. . .

**regaining composure**

Sorry, I'm really not trying to troll here, continue on. . .

Fezboy!

Quiss

unread,
Dec 2, 2001, 8:45:13 PM12/2/01
to
Hi Fez

>
> No, you can still write sloppy code and use deprecated tags. However,
> you can't expect anyone to hand you a cookie for doing so.

I thought my post might get someone's shorts in a knot...

> Either silently go back to HTML 3.x and
> kludge your way around the universe or pull up your trousers and do
> something useful.

Hmmm, HTML 4.x seems to have always done pretty much what I wanted.
Not sure why you think <center> is sloppy. It WORKS. It's USEFUL.

> I took the time to
> learn how to separate content from presentation and to be able to argue
> knowingly as to why this is good idea.

Ah, sorry, I must have missed that post.

I find that sometimes it's hard for people who have gained knowledge to
remember what the process of gaining that knowledge was like.
Here I am, at the bottom of a pile of style sheets, wondering why I ought to
bother. Separating content from presentation? I still have to call something
an <h1> or a class or something. I still have to type a whole bunch of
things into the head tag. There is STILL code on my page! Why this
hysterical insistence to take away my <center> tag only to replace it with
something three times as long?

When I write css code, I not only have to keep track of my tags on the page
I'm working on, but also any and all external style sheets which may or may
not contradict what I was doing here. And if something goes wrong somewhere
and someone's backward issue of I.E. for the Mac doesn't like my stuff, I
can't just test things on the current page, I'll also have to dig through my
external sheet and see if I can work around things. Surely, setting up your
styles and classes just once makes a lot of sense, but so far I found that
troubleshooting the stuff takes more time than just typing it out in HTML.

Perhaps, as with most things, this improves with practice, but in the
meantime it doesn't help to meet the slackjawed bewilderment of the average
newbie with condescending rants. To the beginner, this css thing can look
downright ridiculous and we need confirmation that we're not missing
something important to account for this. Newbies frequent these groups to
get answers, and sometimes those answers go beyond tags and jargon. "suck it
up" isn't an answer.

ciao
C.


Alan J. Flavell

unread,
Dec 2, 2001, 8:49:06 PM12/2/01
to
On Dec 2, Quiss inscribed on the eternal scroll:

> While there are some useful things that can be accomplished with style
> sheets, I am now firmly of the opinion that they were invented by people
> with too much time on their hands.

I think you're confusing them with the time-wasters who gave us
HTML/3.2 - and lost a couple of years of progress as a result.

> I don't feel any particular need to separate content from style,

Then you have no use for TimBL's invention, and are in no position to
evaluate the work of those who do.

> Unfortunately, someone saw fit to complicate matters

They did indeed. They looked at the simplicity of an open-specified
content-based markup with separate presentation suggestions for
various kinds of display situation (the ideas were easily available,
well over half a decade ago), and gave us instead the unutterable
complexity of tag soup, browser compatibility hacks, and HTML3.2
(whose dread legacy is still clearly to be seen in HTML4
transitional).

> and, from the looks of
> things, we're going to have to follow suit.

Oh no, we're getting back on course now, if misguided hacks wouldn't
keep flooding us with tag soup and hankering after compatibility with
existing browser bugs.

> Perhaps, if we wait long enough, someone will come up with something
> simpler.

They already have. It's called (X)HTML strict with CSS2(1998). And
we're finally getting browsers that don't screw it up.

> I can't imagine that the average newbie web author (such as one
> looking to just make a page for themselves), is going to slog through a code
> that seems to have more exceptions and workarounds than rules.

Sounds like a description of the currently available browsers. Do you
blame the telephone directory when the number you wanted is out of
order?

> www.NerdsUnlimited.net

Not a real URL, but after being given the HTTP runaround we get this:

[spacer.gif]

[t1.jpg] [t2.jpg] [t3.jpg]

<Nerds Unlimited>
<../web design>
<../image gallery>
<../wallpaper>
<../info>
</Nerds Unlimited>
[spacer.gif]
[b2.jpg]

Which rather confirms my original assumption. You have no use for
this HTML thing. You want DTP.


Eric Gisin

unread,
Dec 2, 2001, 9:52:05 PM12/2/01
to
I thought the purists were trolls. You take the cake.

The center tag was useful in ancient browsers. Align=center is fully
supported in V4 browsers, and the CSS equivalents in modern browsers. Only a
fucking moron would use <center>.

"Quiss" <qu...@mad.scientist.com> wrote in message
news:uGAO7.1496$V12.4...@news20.bellglobal.com...

Quiss

unread,
Dec 2, 2001, 10:47:42 PM12/2/01
to
Oh dear, Alan

How unfortunate that you saw fit to reaffirm my assumption about people with
too much time on their hands by trying to find fault with my homepage (which
is at this point a dig at people who think they can create webpages with
Fireworks) instead of looking beyond your nose.
(And I'm saving a lot of money by using a domain name host - sorry for
making you dig for my code, it was not my intent to cause you unnecessary
hardship)

> Then you have no use for TimBL's invention, and are in no position to
> evaluate the work of those who do.

Unlike you, I would not presume to evaluate anyone, and I have not.
I just want to keep my center tag. I'm confused by the mind-boggling hoops
you seem to have to jump through to center a table, or the content within
it, especially in nested tables, for example. I'm here going by various
posts and tutorials I've seen.

One site, by a self-styled css expert, absolutely advocated staying with
some excruciatingly boring designs in order to keep everything ticking along
nicely. THAT is backward. And if he turns out to be simply an excruciatingly
boring person who thinks the entire web should be displayed in Times Roman,
then how can you blame us css newbies for being confused? And then we dare
to question this only to be put on a public pillory? (Btw, may I have a look
at your websites? Perhaps you are the perfect coder I've been so long
searching for)

I'm not sure why you feel personally attacked by my confusion about style
sheets. Did you invent them? If so, I'm sorry for my perhaps unintentionally
harsh words. I hate to insult anyone's religion but this thread is starting
to sound most frighteningly like "down with the infidel". I think maybe we
have enough of that going on already.

C.


Quiss

unread,
Dec 2, 2001, 11:09:08 PM12/2/01
to
Hello Pete
>
> <center>XYZ</center>
>
> <div align="center">XYZ</div>

> But wouldnt you agree the div tag is a lot easier to alter once its in
> place ? .
>
> <div align="center" class="qwerty">XYZ</div>

Ah, thank you, finally a reply to my (novice-like no doubt) puzzlement.
In this case, where a class is assigned to XYZ to add additional styling,
yes it makes sense. But what I was objecting to is that, if I simply wanted
to center an image or a table on a page, without needing anything special
happening to that object, I have to enclose it in some block element
instead of just typing <center>.

Sorry if I'm not explaining this clearly, but I hope that makes sense. I
recognize the value of many css applications that just can't be done in
HTML.
But (and this is what I keep butting my head up against) why deprecate
things that work perfectly well? Is the goal here to eventually have NO code
on a document? In creating classes and applying styles to tags, there is all
sorts of code on the page (when not using external style sheets). Hence I
don't get the assertion that this css thing will separate content from
presentation. From what I see, in some cases there is MORE presentation. And
even the simple (div align="center"> is about twice as much as <center>
Yah, nitpicky, for sure. Sorry about harping about the <center> tag :)
It's very difficult to get things like that across without incurring the
wrath of the css-evangelist. One must word things carefully :)

Tutorials everywhere are very helpful in explaining how to turn <h1> bright
purple and italic. But my worries lie beyond the hover pseudo-whatsit and
making your scrollbar a pretty shade of green. I read posts and examples of
more advanced code that seem extremely complicated, often immediately
followed by explanations of how to write the same thing for other browsers.
Or I've seen pages using re-directs based on browsers. Yikes! Who's got
time for all that ? Am I the only one with budget-conscious clients who
think everything can be done in three clicks of a mouse?

There is something here that I'm just not getting. Maybe I just haven't
figured out how to ask the right question. And of whom.
ciao
C.

Quiss

unread,
Dec 2, 2001, 11:17:04 PM12/2/01
to

"Eric Gisin" <er...@netidea.com> wrote in message
news:9uepd...@enews3.newsguy.com...

> I thought the purists were trolls. You take the cake.
>
> Only a
> fucking moron would use <center>.

Ah, thank you for pointing that out.
Me and several million trolls want to thank you for your insightful
analysis. How fortunate for the Internet community to have contributors like
yourself on the job.
We will rush immediately and replace every instance of <center> with
whatever you deem fit.

Humbly,
C.

Marek Stepanek

unread,
Dec 3, 2001, 5:34:29 AM12/3/01
to
In UtCO7.2045$V12.5...@news20.bellglobal.com on 03.12.2001 4:47 Uhr,
Quiss, qu...@mad.scientist.com wrote :


Oh! Don't wanted to create a flamewar here! Hope I will not sued later, to
pay your therapeutics over two years ;-)

Did not know, that this was a faq-question, but I doubted about it. (thx to
Jerry for the link - I only found this faq, where is nothing mentioned about
my question: http://css.nu/faq/ciwas-aFAQ.html). But I am quite proud,
having found alone two ! solutions to align the table in the horizontal
centre. I know that standards develop, unfortunately rarely they become less
complicate. That's the same for laws. But why not simply allow to centre a
block-element in a css like that:

table{
width: 80%;
align: centre;
}

I find it absurd, being forced to align an Image with a <P>aragraph around,
with this style definition:

text(!)-align: centre;

And in all this block&inline-conception I am missing something completely:
how to align something on the bottom of the screen.

.alignbtrt{
position: fixed;
top: auto;
left: 0;
right: 0;
bottom: 0;
padding-left: 70%;
}

I call this overkill. (Hope this is an correct example I'm giving here,
because its not working in all browsers.) Why not simply { align= bottom,
right;} ?


okok, I will shut up now, don't want to heat up this discussion anymore.


marek


ps: TimBL's invention? <- also a FAQ? ;-)

Headless

unread,
Dec 3, 2001, 6:25:50 AM12/3/01
to
"Quiss" <qu...@mad.scientist.com> wrote:

>Why this
>hysterical insistence to take away my <center> tag only to replace it with
>something three times as long?

I haven't used <center> in ages, but I'd agree with you on this one. I
can't see any reason for replacing it with something else, I stopped
using it only so that my code would validate.

Even ardent css supporters would say that css2 is by no means perfect
and imo occasionally simply silly. And that's just on a theoretical
level, when you take into account the practical problems like the
differences in browser css implementation and the fact that css isn't
used much by authors (or wysiwyg apps like Dreamweaver afaik), I'd
forgive you for thinking "why bother?".

My guess is that today most of the css on the web is used for creating
e.g. a mouse over effect that cannot be done with straight html. It's
relatively rare to find a site that uses css "properly". My impression
is that most sites that use css properly are done by amateurs (no
disrespect, some of these "amateurs" have a skill level far surpassing
that of most "professionals").

>To the beginner, this css thing can look downright ridiculous

Agreed, but css is on balance a good thing, stick with it if you have
the time (it's not a waste ;-)


Headless

Eric Jarvis

unread,
Dec 3, 2001, 6:51:02 AM12/3/01
to
on Mon, 03 Dec 2001 11:25:50 +0000, head...@dna.ie wrote...

> "Quiss" <qu...@mad.scientist.com> wrote:
>
> >To the beginner, this css thing can look downright ridiculous
>
> Agreed, but css is on balance a good thing, stick with it if you have
> the time (it's not a waste ;-)
>

css makes a lot more sense if you think of a web site as a set
of logical concepts first and as something visual (or aural)
second...the mark up is entirely concerned with the logical
structure so that whatever sense is used to interpret it the
logic can be consistent...and the css is there to direct the
representation of it

which is why <center> doesn't work...it is purely visual...it
makes no sense in speech...it doesn't affect the concepts behind
the document

once you get into the way of marking up documents conceptually
it can get very easy to deal with adding documents to an
extensive and complex site...no need to worry about
layout...just drop content into the template and now and again
mark up divs with the logically names classes already
prepared...and hey presto! completed pages without having to
look anything up

--
eric
"I got in touch with my inner child,
he told me to grow up"

Thomas Lotze

unread,
Dec 3, 2001, 8:24:30 AM12/3/01
to
Quiss schrieb:

>
> In creating classes and applying styles to tags, there is all
> sorts of code on the page (when not using external style sheets). Hence I
> don't get the assertion that this css thing will separate content from
> presentation. From what I see, in some cases there is MORE presentation.

I think the problem here is that what you understand
by presentation is something else than the rest of us
do. Of course your document will have to be filled
with markup info such as "this is a heading" or "this
is a paragraph". However, that is actually part of
the content, in that it gives additional meaning to
the words you write.

OTOH, presentation is what you make of a heading or a
paragraph. Since you as the author don't know how the
someone is going to experience your web site, you
best leave it up to the visitor to decide how his
web site experiencing device (as opposed to the word
"browser" that sounds too much like visual
presentation) makes him know that something is a
heading. You as the author can give hints, but not
more.

As for your particular example, centering wouldn't
make much sense if the web site is being read to a
blind visitor. It's much more useful if the aural
browser could say "now comes a quotation" -- if
it's a quotation you want to have centered -- than
if it blathered something about visual appearance
to the blind person. You would then have to mark up
the quotation as a div of the class "quotation" and
create stylesheets that tell a visual browser to
center the thing and aural one to say "quotation".

Or, if it's a heading you want to center, a search
engine that is interested in page headings couldn't
find it if it's just centered, not marked up
logically as the heading it is.

Cheers, Thomas

--
Thomas Lotze - thomas.lotze *at* gmx.net

http://www.thomas-lotze.de
http://www.thomas-lotze.de/Schiebefax :o)

Nick Theodorakis

unread,
Dec 3, 2001, 9:43:39 AM12/3/01
to
In <9uepd...@enews3.newsguy.com>, Eric Gisin wrote:
>
>I thought the purists were trolls. You take the cake.
>
>The center tag was useful in ancient browsers. Align=center is fully
>supported in V4 browsers, and the CSS equivalents in modern
browsers. Only a
>fucking moron would use <center>.
>

So exactly why is using <div align="center"> (or <table align="center">,
etc.) any better than <center>? Is there a reason why using a deprecated
attribute is better than using a deprecated element?

I believe one of the points that the OP made was that CSS methods for
alignment suffer from inconsistent and faulty treatment among popular
browsers (and can be somewhat obscure to CSS neophytes, of which I
still consider myself -- and anyway, "neophyte" sounds so much better
then "f***ing moron") .

Nick

--
Nick Theodorakis
nicholas_t...@urmc.rochester.edu
http://www.stjohnsroch.org/

Nick Hansen

unread,
Dec 3, 2001, 9:53:00 AM12/3/01
to
Quiss wrote:

> Hi Fez
>
><snip>
>


I do want to apologize, for it must seem to you that by stating an
innocent opinion you were thrown to the wolves, so to speak. It's not
just your post that caused my outburst. Your's just happened to occur
at the proper confluence of events.

What I was getting at is that everyday someone stops by this newsgroup
and asks a question like Marek. Yes, that person will probably get a
little toasted for asking a FAQ question as this newsgroup is a little
more hostile than others out there. However, what makes no sense to me
is this tendency for someone else to malign CSS for not matching their
expectations. If one has decided that CSS is bull and not worth their
time, they shouldn't bother reading this newsgroup. If, on the other
hand, a person wants to learn why CSS behaves the way it does and would
like to employ it in their daily designing, why do they only make that
initial move towards learning CSS and then step back and tell the world
that it is too difficult, arcane, and/or arbitrary?

As a newbie I did wonder why things worked the way they did. Instead of
castigating CSS publicly though, I read up on its history, theory, and
implementation. This was, by far, a more useful an approach. That was
the intended point of my previous rant.

As for you question, others have taken the time to answer it. Yes, that
is what I should have done in addition to the rant, but as you no doubt
have ascertained, I am not perfect.


Please accept my apologies.

Fezboy!

Alan J. Flavell

unread,
Dec 3, 2001, 10:56:52 AM12/3/01
to
On Dec 3, Nick Theodorakis inscribed on the eternal scroll:

> So exactly why is using <div align="center"> (or <table align="center">,
> etc.) any better than <center>?

Wrong question. The key issue, in a structure-based markup language,
is the nature of the element. Other attributes are secondary. (And in
many cases deprecated).

Now tell me, what logically based element structure do you suppose a
<center> would be? (Please explain this in terms that also make sense
for an aural browser, or an indexing robot, etc.)

And where's your <left> and <right> tags, hmmm? No doubt you'll also
be wanting <top>, <middle> and <bottom> tags to go with them. Yup,
you just re-invented 1980's-style DTP.

> Is there a reason why using a deprecated
> attribute is better than using a deprecated element?

I'd say "yes", if those are the only choices that you're offering.

> I believe one of the points that the OP made was that CSS methods for
> alignment suffer from inconsistent and faulty treatment among popular
> browsers

Sure. They started so much later (having wasted their time on the
mess that became HTML3.2), and Netscape shot themselves in the other
foot too with JSSS, so it's not surprising they took so long to catch
up. The arena browser had become an antique before the popular
browsers were doing nearly as well as it had done in this regard.
(Yes, I know that the TR version of CSS1 was quite a bit different
from the original CSS draft, but that's not the point).

bit-b...@maney.org

unread,
Dec 3, 2001, 5:19:10 PM12/3/01
to
On Mon, 3 Dec 2001 11:51:02 -0000 in comp.infosystems.www.authoring.stylesheets Eric Jarvis wrote:

: css makes a lot more sense if you think of a web site as a set

: of logical concepts first and as something visual (or aural)
: second...the mark up is entirely concerned with the logical
: structure so that whatever sense is used to interpret it the
: logic can be consistent...and the css is there to direct the
: representation of it

spot on.

: which is why <center> doesn't work...it is purely visual...it

: makes no sense in speech...it doesn't affect the concepts behind
: the document

Or to make matters even more confusing, what if the aural browser
decided that tags like <left>, <right>, <center>, etc.. corresponded
to specific audio channels. IOW, in the case of a conversation,
everything in <left> would be one speaker; <right> would be another
speaker (presumably even a different synthesized voice) and <center>
would be the voice of a third person or moderator.

: once you get into the way of marking up documents conceptually

: it can get very easy to deal with adding documents to an
: extensive and complex site...no need to worry about
: layout...just drop content into the template and now and again
: mark up divs with the logically names classes already
: prepared...and hey presto! completed pages without having to
: look anything up

Though this really only works well with external style sheets or
with pages that are processed first.

fpsm
--
| Fredrich P. Maney maney at maney dot org |
| Do NOT send me HTML formatted E-mail or copies of netnews posts! |
| Address in header is a spamtrap. Use one in signature for replies. |
| Please review http://www.maney.org/fred/site/uce/ before emailing. |

Quiss

unread,
Dec 3, 2001, 6:02:37 PM12/3/01
to
Thanks

I think I have a better grip on some of what's puzzled me - or at least
this... interesting thread has helped me look at some things a little
differently.

A big thanks for those whose comments were ultimately helpful - Fez, Eric
J., Thomas, et al. You know who you are.
As for those of you who weren't... well, you know what you are.
And thanks for Marek for getting this whole thing started!

Chris, the neophite (a.k.a. f***ing moron)


Eric Jarvis

unread,
Dec 4, 2001, 5:13:02 AM12/4/01
to
on Mon, 3 Dec 2001 18:02:37 -0500, qu...@mad.scientist.com
wrote...

> Thanks
>
> I think I have a better grip on some of what's puzzled me - or at least
> this... interesting thread has helped me look at some things a little
> differently.
>
> A big thanks for those whose comments were ultimately helpful - Fez, Eric
> J., Thomas, et al. You know who you are.
> As for those of you who weren't... well, you know what you are.
> And thanks for Marek for getting this whole thing started!
>

like a lot of things, the web can look complicated or
straightforward depending on how much you know and from what
angle you look at it...sometimes it is difficult to tell if it
is looking understandable because of having the right point of
view, or just through ignorance

I need to keep discussing the basics of the process of making
web sites or I'll start losing perspective...and in this game we
are all fairly ignorant...it's too new for anyone to know it all
as yet

Jan Roland Eriksson

unread,
Dec 8, 2001, 8:54:35 AM12/8/01
to
On Mon, 03 Dec 2001 14:43:39 GMT, Nick Theodorakis
<nicholas_t...@urmc.rochester.edu> wrote:

>So exactly why is using <div align="center"> (or <table align="center">,
>etc.) any better than <center>? Is there a reason why using a deprecated
>attribute is better than using a deprecated element?

Lets hack up an example and it might become more clear...

<div class="FormalPara" align="center">
<h4>Title of formal paragraph</h4>
<p>Some paragraph text...</p>
<p>And then some more text.</p>
</div>

<center class="FormalPara">
<h4>Title of formal paragraph</h4>
<p>Some paragraph text...</p>
<p>And then some more text.</p>
</center>

The first snippet tells us that we have a 'DIVision' in the instance
where the author has added some more detailed info 'FormalPara' in an
attempt to better describe the nature of the DIV content.

Also, as per CSS specs, stylesheet aware clients are supposed to
internally treat 'align="center"' as if the stylesheet has a
declaration 'text-align: center' in effect for that DIV (which of
course shall inherit into h4 and p too) with a specificity of '0' and
located _before_ any other declarations in the stylesheet.

There is no similar "migration of presentational values to CSS rules"
defined for elements so...

<center class="FormalPara">
...

...would stay as the tag-soup it is, besides the fact that it
looks pretty dumb to classify 'an order to do something' as a
formal paragraph :-)

>I believe one of the points that the OP made was that CSS methods for
>alignment suffer from inconsistent and faulty treatment among popular

>browsers...

Sure; part of that comes from wasted energy and lack of RTFM, and the
other part comes from deliberate board room decisions.

(and there is nothing wrong in being "moronized".
it's a curable state of mind :-)

--
Rex .. Moronization: a form of acculturation where people are encouraged
to anoint themselves with the supposed benefits of a technology
without understanding the engineering (or lack thereof.)

Nick Theodorakis

unread,
Dec 8, 2001, 11:07:15 AM12/8/01
to
In <00541ukfhdf03vh7q...@4ax.com>, Jan Roland Eriksson wrote:
>
>On Mon, 03 Dec 2001 14:43:39 GMT, Nick Theodorakis
><nicholas_t...@urmc.rochester.edu> wrote:
>
>>So exactly why is using <div align="center"> (or <table align="center">,
>>etc.) any better than <center>? Is there a reason why using a deprecated
>>attribute is better than using a deprecated element?
>
>Lets hack up an example and it might become more clear...
>
> <div class="FormalPara" align="center">
> <h4>Title of formal paragraph</h4>
> <p>Some paragraph text...</p>
> <p>And then some more text.</p>
> </div>
>
> <center class="FormalPara">
> <h4>Title of formal paragraph</h4>
> <p>Some paragraph text...</p>
> <p>And then some more text.</p>
> </center>
>
>The first snippet tells us that we have a 'DIVision' in the instance
>where the author has added some more detailed info 'FormalPara' in an
>attempt to better describe the nature of the DIV content.
>

I see what you are getting at (And a much more lucid and useful explanation than
saying that someone would have to be a "f***ing moron" to use <center>, as
another poster had said). But I would guess that most CSS-knowledgeable writers
would prefer to add the alignment to the class in CSS.


>Also, as per CSS specs, stylesheet aware clients are supposed to
>internally treat 'align="center"' as if the stylesheet has a
>declaration 'text-align: center' in effect for that DIV (which of
>course shall inherit into h4 and p too) with a specificity of '0' and
>located _before_ any other declarations in the stylesheet.

[...]


This is an interesting piece of information. Now I'm curious: are there any
browsers that actually do this? I just took a quick look at a <table> centered
either by <div align="center"> or by <table align="center">) and neither IE5 nor
NS6.1 (on Win98) passed the inheritance of the centering to the table cell
contents (or did I misunderstand you?). (An example can be found toward the
bottom of the document <http://theodorakis.net/tablecentertest.html>)

Rijk van Geijtenbeek

unread,
Dec 8, 2001, 4:35:04 PM12/8/01
to
On Sat, 08 Dec 2001 16:07:15 GMT, Nick Theodorakis
<nicholas_t...@urmc.rochester.edu> wrote:

>In <00541ukfhdf03vh7q...@4ax.com>, Jan Roland Eriksson wrote:

[..]

>>Also, as per CSS specs, stylesheet aware clients are supposed to
>>internally treat 'align="center"' as if the stylesheet has a
>>declaration 'text-align: center' in effect for that DIV (which of
>>course shall inherit into h4 and p too) with a specificity of '0' and
>>located _before_ any other declarations in the stylesheet.
>[...]

>This is an interesting piece of information. Now I'm curious: are there any
>browsers that actually do this? I just took a quick look at a <table> centered
>either by <div align="center"> or by <table align="center">) and neither IE5 nor
>NS6.1 (on Win98) passed the inheritance of the centering to the table cell
>contents (or did I misunderstand you?). (An example can be found toward the
>bottom of the document <http://theodorakis.net/tablecentertest.html>)

Try an early beta of Opera 4. That was when Opera started to work in
the way Roland described. There had to be made some exceptions though,
as half the pages on the net (this is only a little bit exaggerated)
were displayed with all their lines centered...

--
If you don't like having choices | Rijk van Geijtenbeek
made for you, you should start | Documentation & QA
making your own. - Neal Stephenson | mailto:ri...@opera.com

Jan Roland Eriksson

unread,
Dec 9, 2001, 12:49:59 AM12/9/01
to
On Sat, 08 Dec 2001 16:07:15 GMT, Nick Theodorakis
<nicholas_t...@urmc.rochester.edu> wrote:

>In <00541ukfhdf03vh7q...@4ax.com>, Jan Roland Eriksson wrote:

[...]


>>Also, as per CSS specs, stylesheet aware clients are supposed to
>>internally treat 'align="center"' as if the stylesheet has a
>>declaration 'text-align: center' in effect for that DIV (which of
>>course shall inherit into h4 and p too) with a specificity of '0' and
>>located _before_ any other declarations in the stylesheet.

>This is an interesting piece of information. Now I'm curious: are there any


>browsers that actually do this?

Opera, to some extent (as Rijk clarifies in his post)

>I just took a quick look at a <table> centered either by
><div align="center"> or by <table align="center">) and neither

>IE5 nor NS6.1 (on Win98) passed the inheritance...

Their fault in, theory at least. But as Rijk says, pragmatism has to
take its toll here, lest the whole www would go centered due to stupid
implementation of the whole thing in MSIE.

--
Rex...
Who is continuously amazed by the fact that such a nice guy
as CW can voluntarily stay employed by MS. Toby Speigh's standard
"Pink Floyd" quoted sig says it all, for those who care.

Gareth Williams

unread,
Dec 16, 2001, 4:54:14 PM12/16/01
to
Rijk van Geijtenbeek <ri...@opera.com> wrote:

>On Sat, 08 Dec 2001 16:07:15 GMT, Nick Theodorakis
><nicholas_t...@urmc.rochester.edu> wrote:
>
>>In <00541ukfhdf03vh7q...@4ax.com>, Jan Roland Eriksson wrote:
>
>[..]
>
>>>Also, as per CSS specs, stylesheet aware clients are supposed to
>>>internally treat 'align="center"' as if the stylesheet has a
>>>declaration 'text-align: center' in effect for that DIV (which of
>>>course shall inherit into h4 and p too) with a specificity of '0' and
>>>located _before_ any other declarations in the stylesheet.
>>[...]
>
>>This is an interesting piece of information. Now I'm curious: are there any
>>browsers that actually do this? I just took a quick look at a <table> centered
>>either by <div align="center"> or by <table align="center">) and neither IE5 nor
>>NS6.1 (on Win98) passed the inheritance of the centering to the table cell
>>contents (or did I misunderstand you?). (An example can be found toward the
>>bottom of the document <http://theodorakis.net/tablecentertest.html>)
>
>Try an early beta of Opera 4. That was when Opera started to work in
>the way Roland described. There had to be made some exceptions though,
>as half the pages on the net (this is only a little bit exaggerated)
>were displayed with all their lines centered...

I hope that the browsers don't end up blurring the meanings of
"table align = center" (bulk align of table within which I may want
text set left - I do not want that inherited!)
with
"table of class having attribute text-align = center" (alignment I
_would_ like inherited to the content of all cells of the table )

... and have I missed something ? In CSS1 I dont see a box or other
property equivalent to the deprecated align.
What is the currently favoured css incantation to set a table in the
centre of the users visible window ...

... which would be equivalent to the recommendation in the WDG HTML
4.0 reference :
"Since many browsers do not support ALIGN=center with TABLE, authors
may wish to place the TABLE within a CENTER element"
( as has been firmly stated in this news group : only a f-ing moron
would use a CENTER element? )


--
regards
Gareth Williams
(real address -> g...@fmode.demon.co.uk)

Rijk van Geijtenbeek

unread,
Dec 16, 2001, 6:01:04 PM12/16/01
to
On Sun, 16 Dec 2001 21:54:14 +0000, Gareth Williams
<gw.f...@nospam.demon.co.uk> wrote:

[..]

>I hope that the browsers don't end up blurring the meanings of
>"table align = center" (bulk align of table within which I may want
>text set left - I do not want that inherited!)
>with
>"table of class having attribute text-align = center" (alignment I
>_would_ like inherited to the content of all cells of the table )

Well, browsers are supposed to treat the presentational attributes of
HTML 4 like the equivalent properties in CSS. The HTML 4 spec doesn't
make that easy when 'align' in:
<TABLE align=center>
and
<P align=center>
doesn't have the same meaning...

To work around this, and support the legacy display expectations,
browsers could add this rule to the base UA stylesheet:

table[align=center] {
margin-left:auto; margin-right: auto; text-align: left;
}

>... and have I missed something ? In CSS1 I dont see a box or other
>property equivalent to the deprecated align.
>What is the currently favoured css incantation to set a table in the
>centre of the users visible window ...

Or for that matter, any block-level element with a declared width?

See http://allmyfaqs.com/cgi-bin/wiki.pl?Center_with_CSS

>... which would be equivalent to the recommendation in the WDG HTML
>4.0 reference :
>"Since many browsers do not support ALIGN=center with TABLE, authors
>may wish to place the TABLE within a CENTER element"
>( as has been firmly stated in this news group : only a f-ing moron
>would use a CENTER element? )

OK, that base UA stylesheet should also have

center table {
margin-left:auto; margin-right: auto; text-align: left;
}

in it ;-)

--
If Microsoft invented plumbing, legions | Rijk van Geijtenbeek
of hackers would smugly discuss the |
benefits of washing in a stream. | http://rijk.op.het.net/
- Michael Kanellos | mailto:ri...@iname.com

Gareth Williams

unread,
Dec 17, 2001, 4:29:38 AM12/17/01
to
Rijk van Geijtenbeek <ri...@iname.com> wrote:

<snip>


>
>OK, that base UA stylesheet should also have
>
> center table {
> margin-left:auto; margin-right: auto; text-align: left;
> }
>
>in it ;-)

many thanks Rijk ...
sometimes it is hard to read between the lines of a bare
specification.

0 new messages