MediaWiki:Mobile.css
Appearance
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.
/* =========================
MOBILE RESPONSIVE FIXES
MediaWiki Common.css
========================= */
/* Prevent horizontal scrolling */
html, body {
max-width: 100%;
overflow-x: hidden;
}
/* Make images scale properly */
img {
max-width: 100%;
height: auto;
}
/* Responsive tables */
table {
width: 100%;
max-width: 100%;
overflow-x: auto;
display: block;
}
/* Infobox mobile behavior */
.infobox {
float: right;
width: 300px;
max-width: 100%;
margin: 0 0 1em 1em;
border: 1px solid #aaa;
background: #f9f9f9;
padding: 8px;
box-sizing: border-box;
}
/* Mobile layout */
@media screen and (max-width: 768px) {
/* Make content fit screen */
#content,
.mw-body,
.vector-body {
width: 100% !important;
margin: 0 !important;
padding: 10px !important;
box-sizing: border-box;
}
/* Stack infoboxes */
.infobox {
float: none;
width: 100%;
margin: 1em 0;
}
/* Better text sizing */
body {
font-size: 16px;
line-height: 1.5;
}
/* Prevent giant headings */
h1 {
font-size: 1.8em;
}
h2 {
font-size: 1.4em;
}
h3 {
font-size: 1.2em;
}
/* Navigation cleanup */
#mw-panel,
.vector-sidebar {
width: 100%;
}
/* Responsive tables */
table {
display: block;
overflow-x: auto;
white-space: nowrap;
}
/* Fix long links/text */
a,
p,
li {
word-wrap: break-word;
overflow-wrap: break-word;
}
}