Template:Mw-datatable
I18n/Uses TemplateStyles | I18n/Uses TemplateStyles |
This template enables row hover highlighting via wikitable class modifiers mw-datatable and hover-highlight.
In addition to adding row highlights, mw-datatable also changes the background of the cells to white. To only add a highlight, use hover-highlight.
Usage. {{row hover highlight}}[change]
Basic usage:
Wikitext <syntaxhighlight lang="wikitext" highlight="1-2">
CSS | This template uses TemplateStyles:
|
This template (re)enables row hover highlighting via wikitable class modifier mw-datatable.
How to use[change]
Just add {{row hover highlight}}
(or {{mw-datatable}}
), in any side before table with the class mw-datatable. For example:
- <syntaxhighlight lang="wikitext">
</syntaxhighlight>
For more information: Help:Table#mw-datatable – row highlighting via cursor hover. White background
1 | 2 | 3 |
---|---|---|
1-1 | 2-1 | 3-1 |
1-2 | 2-2 | 3-2 |
Rendered result
CSS | This template uses TemplateStyles:
|
This template (re)enables row hover highlighting via wikitable class modifier mw-datatable.
How to use[change]
Just add {{row hover highlight}}
(or {{mw-datatable}}
), in any side before table with the class mw-datatable. For example:
- <syntaxhighlight lang="wikitext">
</syntaxhighlight>
For more information: Help:Table#mw-datatable – row highlighting via cursor hover. White background
1 | 2 | 3 |
---|---|---|
1-1 | 2-1 | 3-1 |
1-2 | 2-2 | 3-2 |
class=mw-datatable
can be used in combination with class=wikitable
, in which case the non-header cells will have a white background.
Wikitext <syntaxhighlight lang="wikitext" highlight="1-2">
CSS | This template uses TemplateStyles:
|
This template (re)enables row hover highlighting via wikitable class modifier mw-datatable.
How to use[change]
Just add {{row hover highlight}}
(or {{mw-datatable}}
), in any side before table with the class mw-datatable. For example:
- <syntaxhighlight lang="wikitext">
</syntaxhighlight>
For more information: Help:Table#mw-datatable – row highlighting via cursor hover. White background
1 | 2 | 3 |
---|---|---|
1-1 | 2-1 | 3-1 |
1-2 | 2-2 | 3-2 |
Rendered result
CSS | This template uses TemplateStyles:
|
This template (re)enables row hover highlighting via wikitable class modifier mw-datatable.
How to use[change]
Just add {{row hover highlight}}
(or {{mw-datatable}}
), in any side before table with the class mw-datatable. For example:
- <syntaxhighlight lang="wikitext">
</syntaxhighlight>
For more information: Help:Table#mw-datatable – row highlighting via cursor hover. White background
1 | 2 | 3 |
---|---|---|
1-1 | 2-1 | 3-1 |
1-2 | 2-2 | 3-2 |
To keep the light gray background from class=wikitable
, use class=hover-highlight
:
Wikitext <syntaxhighlight lang="wikitext" highlight="1-2">
CSS | This template uses TemplateStyles:
|
This template (re)enables row hover highlighting via wikitable class modifier mw-datatable.
How to use[change]
Just add {{row hover highlight}}
(or {{mw-datatable}}
), in any side before table with the class mw-datatable. For example:
- <syntaxhighlight lang="wikitext">
</syntaxhighlight>
For more information: Help:Table#mw-datatable – row highlighting via cursor hover. White background
1 | 2 | 3 |
---|---|---|
1-1 | 2-1 | 3-1 |
1-2 | 2-2 | 3-2 |
Rendered result
CSS | This template uses TemplateStyles:
|
This template (re)enables row hover highlighting via wikitable class modifier mw-datatable.
How to use[change]
Just add {{row hover highlight}}
(or {{mw-datatable}}
), in any side before table with the class mw-datatable. For example:
- <syntaxhighlight lang="wikitext">
</syntaxhighlight>
For more information: Help:Table#mw-datatable – row highlighting via cursor hover. White background
1 | 2 | 3 |
---|---|---|
1-1 | 2-1 | 3-1 |
1-2 | 2-2 | 3-2 |
Usage. {{mw-datatable}}. Easier to remember for white background.[change]
If you want a white background for data cells, then this may be easier to remember since the template and class name are the same.
Wikitext <syntaxhighlight lang=wikitext highlight="1-2">
1 | 2 | 3 |
---|---|---|
1-1 | 2-1 | 3-1 |
1-2 | 2-2 | 3-2 |
Rendered result
1 | 2 | 3 |
---|---|---|
1-1 | 2-1 | 3-1 |
1-2 | 2-2 | 3-2 |