|
1 | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
2 | 2 | <html lang="en"> |
3 | | -<!-- $Id: tables.src,v 2.2 1998-02-09 23:48:51 ijacobs Exp $ --> |
| 3 | +<!-- $Id: tables.src,v 2.3 1998-02-10 00:53:42 ijacobs Exp $ --> |
4 | 4 | <head> |
5 | 5 | <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"> |
6 | 6 | <title>Tables</title> |
@@ -883,34 +883,64 @@ class="propinst-text-align">'text-align'</span> property. |
883 | 883 |
|
884 | 884 | <P>Cell boxes in the same column may also be aligned horizontally |
885 | 885 | along a common axis, specified by the <span |
886 | | -class="propinst-column-align">'column-align'</span> property. |
| 886 | +class="propinst-text-align">'text-align'</span> property. The <span |
| 887 | +class="index-inst" title="<string>"><span |
| 888 | +class="value-inst-string"><string></span></span> value of this |
| 889 | +property specifies how cell boxes in the same column will align |
| 890 | +horizontally; it only applies to column and column group elements. |
| 891 | + |
| 892 | +<P>When specified, cell content is aligned along the beginning of the |
| 893 | +specified string (the beginning depends on the <span |
| 894 | +class="propinst-direction">'direction'</span> property). If the |
| 895 | +string occurs more than once in the cell's content, the cell is |
| 896 | +aligned on the first occurrence. If the string doesn't occur, the |
| 897 | +cell is aligned at the end of the content. |
887 | 898 |
|
888 | | -<!-- #include src=properties/column-align.srb --> |
| 899 | +<p>Aligning text in this way is only useful if the text only spans one |
| 900 | +line. The result is undefined if the text spans more than one line. |
889 | 901 |
|
890 | | -<P>Specifies how cell boxes in the same column will align |
891 | | -horizontally. Values have the following meanings:</p> |
| 902 | +<div class="example"><P> |
| 903 | +The following style sheet:</p> |
892 | 904 |
|
893 | | -<dl> |
894 | | -<dt><span class="index-inst" title="<string>"><span |
895 | | -class="value-inst-string"><strong><string></strong></span></span> |
| 905 | +<PRE> |
| 906 | + COL { text-align: "." } |
| 907 | + TD :before { text-align: right; content: "$" } |
| 908 | +</PRE> |
896 | 909 |
|
897 | | -<dd>Align cell content along the beginning of the specified string |
898 | | -(the beginning depends on the <span |
899 | | -class="propinst-direction">'direction'</span> property). |
900 | | -If the string occurs more than once in the cell's content, the |
901 | | -cell is aligned on the first occurrence. |
902 | | -If the string doesn't occur, the cell is aligned at the end of the |
903 | | -content. |
| 910 | +<P>will cause the column of dollar figures |
| 911 | +in the following HTML table:</p> |
904 | 912 |
|
905 | | -<p>Aligning text in this way is only useful if the text only spans one |
906 | | -line. The result is undefined if the text spans more than one line. |
907 | | -</dd> |
| 913 | +<PRE class="html-example"> |
| 914 | +<TABLE> |
| 915 | +<COL width="40"> |
| 916 | +<TR> <TH>Long distance calls |
| 917 | +<TR> <TD> 1.30 |
| 918 | +<TR> <TD> 2.50 |
| 919 | +<TR> <TD> 10.80 |
| 920 | +<TR> <TD> 111.01 |
| 921 | +<TR> <TD> 85. |
| 922 | +<TR> <TD> 90 |
| 923 | +<TR> <TD> .05 |
| 924 | +<TR> <TD> .06 |
| 925 | +</TABLE> |
| 926 | +</PRE> |
908 | 927 |
|
909 | | -<dt><strong>none</strong> |
910 | | -<dd>No column alignment. |
911 | | -</dl> |
| 928 | +<P>to align along the decimal point. For fun, |
| 929 | +we have used the <span class="index-inst" title=":before">:before</span> |
| 930 | +pseudo-class to insert a dollar sign before each figure:</P> |
912 | 931 |
|
913 | | -<!-- Add example -IJ --> |
| 932 | +<PRE> |
| 933 | +Long distance calls |
| 934 | + $1.30 |
| 935 | + $2.50 |
| 936 | + $10.80 |
| 937 | + $111.01 |
| 938 | + $85. |
| 939 | + $90 |
| 940 | + $.05 |
| 941 | + $.06 |
| 942 | +</PRE> |
| 943 | +</div> |
914 | 944 |
|
915 | 945 | <h3><a name="dynamic-effects">Dynamic row and column effects</a></h3> |
916 | 946 |
|
|
0 commit comments