Inline Tables


By default, tables in HTML are displayed as blocks: They end the previous paragraph, and any text after it will be in a new paragraph. However, CSS also supports inline tables, that will not break the line, but are displayed in the sentence in which they occur. Here is how that looks:

Magic squares are formed by placing the numbers 1, 2, 3, etc. in a square grid in such a way that the sum of the numbers in each row and each column is the same. A magic square with 9 cells, such as this has a sum of 15 for every row and every column. Try it with squares of 16 and 25 cells.

Tables are put inline with the display property:

 TABLE { display: inline-table } 



Cascading Style Sheets(c) Designing for the Web
Cascading Style Sheets: Designing for the Web (3rd Edition)
ISBN: 0321193121
EAN: 2147483647
Year: 2003
Pages: 215

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net