GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Main page
  • Contents
  • Current events
  • Random article
  • About Wikipedia
  • Contact us
  • Help
  • Learn to edit
  • Community portal
  • Recent changes
  • Upload file
  • Special pages
  • Search
  • Donate

This view

  • Original page
  • New address

GeezerVison is showing en.wikipedia.org — Template:Row hover highlight - Wikipedia

Permanently protected template
(Redirected from Template:Mw-datatable)
Template documentationviewedithistorypurge
WarningThis template is used on approximately 2,900 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them.
CSSThis template uses TemplateStyles:
  • Template:Row hover highlight/styles.css[e]

This template adds hover highlighting to table rows, making it easier to track a row in wide or tall tables.

Usage

Place {{row hover highlight}} or its redirect {{mw-datatable}} above the table. Add one of the following classes to the table start markup.

Classes for table start markup (e.g., {| class="value value2")
Class Summary
hover-highlight Cell backgrounds unchanged. Row highlights when pointer is over.
mw-datatable Cell backgrounds white. Row highlights when pointer is over.

Header cells unaffected when used with the wikitable class.

Using hover-highlight

Wikitext

{{row hover highlight}}
{| class="wikitable hover-highlight"
|+ Caption
|-
! 0 !! 1 !! 2 !! 3
|-
! 1
| 1-1 || 2-1 || 3-1
|-
! 2
| 1-2 || 2-2 || 3-2
|}

Produces

Caption
0123
1 1-12-13-1
2 1-22-23-2

Using mw-datatable

Wikitext

{{row hover highlight}}
{| class="wikitable mw-datatable"
|+ Caption
|-
! 0 !! 1 !! 2 !! 3
|-
! 1
| 1-1 || 2-1 || 3-1
|-
! 2
| 1-2 || 2-2 || 3-2
|}

Produces

Caption
0123
1 1-12-13-1
2 1-22-23-2

See also

  • Help:Table/Advanced § Highlight rows on hover
  • {{shy}} – Can be used to help narrow columns by adding a soft hyphen to a word to allow it to wrap.

More template styles for tables:

  • {{sticky header}} - makes column headers stick to the top of the page while scrolling through table data.
  • {{sort under}} - moves the sorting arrows under the headers.
  • {{static row numbers}} - adds a column of row numbers to a table.
  • {{table alignment}} - aligns the cells in a column, or a whole table.
The above documentation is transcluded from Template:Row hover highlight/doc. (edit | history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Row_hover_highlight&oldid=1293606965"
Categories:
  • Table templates
  • Templates using TemplateStyles to style external elements
Hidden categories:
  • Wikipedia extended-confirmed-protected templates
  • Templates using TemplateStyles
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.