More table centring

Wednesday, 6 August 2003 12:39
pne: A picture of a plush toy, halfway between a duck and a platypus, with a green body and a yellow bill and feet. (Default)
[personal profile] pne

It seems that XSL-FO has decided to use, MSIE-style, text-align to centre tables, rather than controlling the centring by setting the margins to equal values.

This means that if you want to centre a table-with-caption but have the cell contents default (start) aligned, you need something like

<fo:table-and-caption text-align="center">
  <fo:table-caption text-align="start">
    <fo:block>Table caption goes here</fo:block>
  </fo:table-caption>

  <fo:table […]>
    [… column definitions …]
    <fo:table-body text-align="start">
      [… table rows and cells …]
    </fo:table-body>
  </fo:table>
<fo:table-and-caption>

Foo.

Date: Wednesday, 6 August 2003 09:36 (UTC)
From: [identity profile] suomi-fani.livejournal.com
weißt du eigentlich dass ich mich bei deinen einträgen immer frage ob ich blöd bin?*gg

von was schreibst du da immer bitteschön? lol

Date: Thursday, 7 August 2003 01:15 (UTC)
ext_78: A picture of a plush animal. It looks a bit like a cross between a duck and a platypus. (Default)
From: [identity profile] pne.livejournal.com
Ich glaube, das hat weniger mit 'blöd' als vielmehr mit 'begrenztes Fachgebiet' zu tun... wenn Laura davon erzählt, dass sie irgendein Blatt als sibirische Zitterpappel identifiziert hat, dann sagt mir das ungefähr genauso viel.

Ich hatte ja vorher darüber geschrieben, dass ich eine Tabelle auf einer HTML-Seite mittig darstellen wollte und dafür den richtigen Code suchen musste. Dabei habe ich herausgefunden, dass der Internet Explorer den eigentlich richtigen Code nicht versteht und etwas anderes braucht.

Jetzt habe ich in einem anderen Zusammenhang (XSL-FO, nicht CSS -- die benutzen aber teilweise ähnliche Codes) herausgefunden, dass XSL-FO die Methode benutzt, die der Internet Explorer auf HTML-Seiten erwartet und nicht die, die CSS-standardkompatible Browser auf HTML-Seiten erwarten. Das hat mich ein wenig gestört.

Für Otto Normalverbraucher hat das allerdings ungefähr Null Auswirkung :p

Date: Thursday, 7 August 2003 01:24 (UTC)
From: [identity profile] suomi-fani.livejournal.com
neiiin ich meinte das blöd doch nicht auf dich bezogen (würde ich nie sagen ... ) ;)

hast schon recht, mein fachwissen reicht dafür nicht aus. ich weiß schon was du da genau machst, nur frag ich mich warum... ? sieht ziemlich schwer aus =)

Date: Thursday, 7 August 2003 01:39 (UTC)
ext_78: A picture of a plush animal. It looks a bit like a cross between a duck and a platypus. (Default)
From: [identity profile] pne.livejournal.com
So scheint es mir auch...

auf der Arbeit ist im Moment nicht so viel zu tun, da haben sie mir gesagt, ich soll mal XML + XSLT + XSL-FO lernen, weil ich das vielleicht in der Zukunft gebrauchen kann.

XML und XSLT gingen noch so einigermaßen, aber XSL-FO sieht mir ziemlich kompliziert aus. Vor allem, weil ich nur die Spezifikation habe und kein Tutorial, und die ist halt eher für Leute gedacht, die ein Programm schreiben das XSL-FO versteht, und nicht für Leute, die das einfach benutzen möchten, um Daten zu formatieren...

Obwohl, ob XSLT so einfach ist, wird sich auch noch zeigen; bisher habe ich es mir nur durchgelesen und noch nicht selber ausprobiert. Und ein paar der Beispielevon XSLT, die in XSL-FO-Doku waren, sahen ziemlich anspruchsvoll aus.

Na ja. Schau'n wir mal, wie gut ich damit klarkomme, wenn ich das wirklich brauche.

Profile

pne: A picture of a plush toy, halfway between a duck and a platypus, with a green body and a yellow bill and feet. (Default)
Philip Newton

June 2015

S M T W T F S
 12 3456
78910111213
14151617181920
2122232425 2627
282930    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Thursday, 1 January 2026 14:05
Powered by Dreamwidth Studios