MediaWiki:Common.css
MediaWiki interface page
More actions
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/* Ensure all wikitables are centered */
.wikitable {
margin-left: auto !important;
margin-right: auto !important;
width: 600px !important; /* Specify the width as needed */
}
/* Just in case there are specific classes applied */
table.wikitable {
margin-left: auto !important;
margin-right: auto !important;
}
/* Optional: Center-align the text within the table */
.wikitable td, .wikitable th {
text-align: center !important;
}
/* Ensure all wikitables are centered */
body .wikitable {
margin-left: auto !important;
margin-right: auto !important;
width: 600px !important;
}
/* Forcing the table to center by wrapping it in a div */
body .wikitable-wrapper {
display: flex;
justify-content: center;
}
body .wikitable-wrapper .wikitable {
margin: 0 !important;
}
/* Ensure all wikitables are centered */
body .mw-body .wikitable {
margin-left: auto !important;
margin-right: auto !important;
width: 600px !important;
display: table !important;
}
/* Additional specificity if the theme uses more classes */
body .mw-body .wikitable {
margin-left: auto !important;
margin-right: auto !important;
width: 600px !important;
display: table !important;
}
/* Forcing the table to center by wrapping it in a div */
body .wikitable-wrapper {
display: flex;
justify-content: center;
width: 100%;
}
body .wikitable-wrapper .wikitable {
margin: 0 !important;
width: 600px !important;
}