row and column selectorsExplanationThis selector probably applies much more to CSS when it is used in conjunction with XML than it does when used in conjunction with HTML. This is because HTML provides the table element, while pure structural languages such as XML do not. CSS2 introduces these selectors as well as additions to the display property and new properties to enable the creation of tabular layout using CSS. A row selector selects rows of a table, while a column selector selects columns of a table. These selectors are however quite sophisticated, and allow you to select every row or column, a particular row or column, or every second, fifth, or however many columns or rows, starting at a particular row or column. This is a very advanced feature, and you can safely skip it if you want. SyntaxRow selectorsA row selector comprises a selector to identify the table (remember that with CSS2 any element can be a table), and a second part that identifies the row or rows selected in that table. For example, the selector for the 3rd row of a
singleTo select a single row, the keyword every nthTo select every nth (for example every 3rd or every 70th) row of an element, append You can also nominate the first of the rows to be selected. To select every 3rd row, beginning at the 10th, use the form As a shorthand, every odd row can be selected with the selector Column selectorsA column selector comprises a selector to identify the table (remember that with CSS2 any element can be a table), and a second part that identifies the column or columns selected in that table. For example, the selector for the 3rd column of a table element of class "results" would be
singleTo select a single column, the keyword : every nthTo select every nth (for example every 3rd or every 70th) column of an element, append You can also nominate the first of the columns to be selected. To select every 3rd column, beginning at the 10th, use the form As a shorthand, every odd column can be selected with the selector UseColumn and row selectors are unlikely to find much use with HTML, as HTML already provides the Browser supportDetailed browser support information for this feature can be found in the full version of the Westciv CSS Guide, or in our CSS Browser Support Table. next: introduction to properties(C)1997-2001 Western Civilisation Pty. Ltd. |