Click to See Complete Forum and Search --> : XHTML alignment gone mad...


Scriptage
06-08-2005, 05:42 AM
Consider:

<center>
<table>
<tr>
<td>Hello World!</td>
</tr>
</table>
</center>

How come the td aligns to center? Shouldn't the table align to center but everything contained in the table align left?

Charles
06-08-2005, 05:46 AM
The CENTER element was done away with back in 1999 or so and you're not supposed to be using theTABLE element for layout. Use CSS for presentation and layout.

Scriptage
06-08-2005, 05:52 AM
This happens with everything divs, span tables blah blah
The center tag wasn't "done away with" otherwise it wouldn't be supported. There is no valid reason why tables should not be used for layout.

Charles
06-08-2005, 06:00 AM
Now I remember why we had that little revolution with you English:

From the HTML 4.01 Specification:The CENTER element is exactly equivalent to specifying the DIV element with the align attribute set to "center". The CENTER element is deprecated. (Emphasis in the original.)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 4.01 spec came out 24 December 1999 but these changes came out with HTML 4, 18 December 1997.
* "Depricated" is the term use din the specs to mean that something has been removed from the specs, authors are asked to stop using it and browsers are allowed to stop supporting it.

Scriptage
06-08-2005, 06:17 AM
Ha ha, revolution... I seem to remember you needing support from France, Spain, Holland etc etc... Couldn't do it on your own could you Charles? Proving what? Well we owned you quite conclusively until you begged for help from other countries. You are infact less intelligent cousins of ours with a silly ideology and self infatuation.

I don't see how you have the nerve to call your language English... seems like you couldn't handle those u's eh Charles?

You still didn't answer my question by the way...
It happens with ALL elements, whether I use divs or tables blah blah.
Stop getting up on your high horse all the time, you need to either lighten up or get laid.

Browsers can stop support for the element but if they haven't then I guess you can use it.

If we go by the second comment then why don't we stop using javascript, cookies, embeded flash, java applets etc because some browsers don't handle them or users may have it turned off.

Who actually cares? You can't make all web pages accessible to all people.

As for the racism, tut tut Charles.

Charles
06-08-2005, 06:25 AM
And you guys had the help of the Germans. And we beat you again in 1812. And I won't mention that you wouldn't be speaking English, you would be speaking German were it not for a little help from us every now and then.

When you go about breaking the rules, be they the rules of the internet or the rules for properly governing a far off colony, you can't go complaining about the result.

If you would only start using CSS you would see that the CENTER element is behaving like <div style="text-align:center">
<table>
<tr>
<td>Hello World!</td>
</tr>
</table>
</div>Since it is no longer a part of HTML, browsers can, and apparently do, impliment it any old way that strikes some programmer's fancy.

Scriptage
06-08-2005, 06:39 AM
Ha ha ha... Charles, Charles, Charles.

It is a common American misconception that "America won the War".
We are infact not indebted to you but to the Russians. How many years did it take you to come into the war? A great shame to say you set up the League of Nations and then opted to NOT TAKE PART! If you had done so then maybe the War would not have happened in the first place; another example of The American Ideology of "Do as I say not as I do".

We would not have been speaking German if it wasn't for you by the way. Hitler decided to take on Russia, which was quite a big mistake. Stalin transformed Russia into a world super power through industrialising the country with his 5 year plans. Russia defeated the German army, you just massacred innocent civilians who had done no wrong.

Someone attacks a military target... I know let's nuke their civilians. Evil, evil people. Somewhere in the region of wickedness as Saddam gassing his own people.

As for breaking the rules of governing a colony... It was a monarchy, MONARCHY, MONARCHY! All the rules are decided by the Monarch or do you not have a gauge of government?

Charles
06-08-2005, 06:46 AM
As for breaking the rules of governing a colony... It was a monarchy, MONARCHY, MONARCHY! All the rules are decided by the Monarch or do you not have a gauge of government?And does not a government function only at the consent of the governed? It wasn't Mr. George's boots that set foot on our soils with murderous intent. Those were the boots of Englishmen, and Germans.

But It rust that you get my real point here. When you use the CENTER element you are breaking the rules and you can';t really complain about the result.

Scriptage
06-08-2005, 06:56 AM
Wasn't it infact your people (and to an extent my people) who set foot on the Native American people's soil with murderous intent? Swings and roundabouts Charles.

My ORIGINAL point being:

When you nest elements, ie:

<div align="center">
<div>
This text is also centered.
</div>
</div>

The nested element has the same alignment as the containing element. Is it in the XHTML specification that all div's MUST have an align attribute? If not the nested element should default to the left alignment.

Charles
06-08-2005, 07:02 AM
Wasn't it infact your people (and to an extent my people) who set foot on the Native American people's soil with murderous intent? Swings and roundabouts Charles.

My ORIGINAL point being:

When you nest elements, ie:

<div align="center">
<div>
This text is also centered.
</div>
</div>

The nested element has the same alignment as the containing element. Is it in the XHTML specification that all div's MUST have an align attribute? If not the nested element should default to the left alignment.And the murderous intent of the Fathers of my country quckly turned genocidal.

You really are confused, in XHTML, just like in HTML, only the COL, COLGROUP, TBODY, TD, TFOOT, TH, THEAD, and TR elements can have an "align" attribute. For the rest it has been depricated.

What is being passed down isn't the alignment of the elements but the alignment of the text within the element. Read http://www.w3.org/TR/CSS2/ and it will all become clear.

Scriptage
06-08-2005, 09:26 AM
Sorry just got back from lunch...

I haven't really got time to look through that large, to say the least, document...

What is the specified method of aligning elements if align is depricated? text-align? or is that just for text and not elements?

Charles
06-08-2005, 01:16 PM
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Example</title>

<style type="text/css">
<!--
p.ipsem {border:solid 1px #a00; margin:auto; padding:1ex; width:20em}
-->
</style>

</head>
<body>
<p class="ipsem">Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima.</p>
</body>
</html>