>> English << | česky | Português | ZVON > Tutorials > CSS2 tutorial |
Intro / Search / ZVON |
>> Example 45 << | Prev | Next | Index | Contents |
Data in table cells can be horizontally aligned to the left, right, or center(1). They can be also aligned along a vertical axis according to a specified character(2).
XML Source | CSS stylesheet | Example link |
---|---|---|
(1)
<AAA> <BBB> <CCC>12.12</CCC> <DDD>xxxx d xxxx</DDD> </BBB> <BBB> <CCC>111112.12</CCC> <EEE>x e xxxx</EEE> </BBB> <BBB> <CCC>12.122222</CCC> <DDD>xxxxxxx d xx</DDD> </BBB> </AAA> | * {padding:1ex;} AAA {display: table;} BBB {display: table-row;} CCC {display: table-cell; text-align: right} DDD {display: table-cell; text-align:left} EEE {display: table-cell; text-align:center} CCC,DDD,EEE {border:solid} | View output |
XML Source | CSS stylesheet | Example link |
(2)
<AAA> <BBB> <CCC>12.12</CCC> <DDD>xxxx d xxxx</DDD> </BBB> <BBB> <CCC>111112.12</CCC> <EEE>x e xxxx</EEE> </BBB> <BBB> <CCC>12.122222</CCC> <DDD>xxxxxxx d xx</DDD> </BBB> </AAA> | * {padding:1ex;} AAA {display: table;} BBB {display: table-row;} CCC {display: table-cell; text-align: "."} DDD {display: table-cell; text-align:"d"} EEE {display: table-cell; text-align:"e"} CCC,DDD,EEE {border:solid} | View output |