Search results
Results from the WOW.Com Content Network
If you use tables for two-dimensional graphics you might discover a "feature" in HTML that promotes grey hair. It can affect both rows and columns, depending on the use of either rowspan or colspan. In this 7-row table three cells are assigned a rowspan of 3, but the table totals 6 rows. Where is row 4? There is a row 5-4!
|+ Table caption adds the caption "Table caption" to the top of the table. A caption is optional, but recommended according to accessibility guidelines. |-adds a new row, which should be followed by the same number of cells found in other rows. Note, rowspan="2" and colspan="2" can be used on cells to span multiple rows and columns.
More template styles for tables: {{sticky header}} - Makes column headers stick to the top of the page while scrolling through table data. {} - moves the sorting arrows under the headers. {{row hover highlight}} - adds row hover highlighting, and option for white background. {{static row numbers}} - adds a column of row numbers to a table.
Consecutive rows of column headers are top sticky, so avoid adding a row of headers right under the column headers that don't apply to the entire table such as a section header meant to visually separate the table. A solution might be to move each section to a column or separate tables, which also avoids accessibility issues per MOS:COLHEAD.
There is a way to break up a table (a too-wide table for example) into more tables without losing all the background colors, and other inline styling. Copy the table to 2 sandboxes (or one sandbox, and in the article itself). Then delete the columns not needed on one of the new tables.
! colspan="2" {{vert header|cellstyle=background-color:gold|Your text here}} – produces a header spanning two columns, with a gold background; use no vertical bar after colspan; You can also use the ! {{verth|Your text here}} shorthand. An example below (from Help:Sortable tables) with headers that span rows or columns (using rowspan and ...
Get AOL Mail for FREE! Manage your email like never before with travel, photo & document views. Personalize your inbox with themes & tabs. You've Got Mail!
Background color on rows will look off if one of the cells spans multiple rows (ex. rowspan="2"). If the table is sortable, then this gets fixed once sorted since sortable collapses row spans. If the table is sortable, then this gets fixed once sorted since sortable collapses row spans.