MediaWiki:Common.css: Difference between revisions
Appearance
No edit summary |
No edit summary |
||
| Line 40: | Line 40: | ||
position: relative !important; | position: relative !important; | ||
z-index: 2 !important; | z-index: 2 !important; | ||
} | |||
@media (max-width: 900px) { | |||
.mw-header .vector-search-box, | |||
.mw-header #p-search { | |||
position: static !important; | |||
transform: none !important; | |||
width: 100% !important; | |||
margin: 8px 0 0 !important; | |||
} | |||
} | } | ||
Revision as of 19:17, 13 December 2025
/* =========================================================
TRUE center search (independent of left/right header content)
Vector 2022
========================================================= */
/* Make header positioning context */
.mw-header {
position: relative !important;
}
/* Absolutely center the search box */
.mw-header .vector-search-box,
.mw-header #p-search {
position: absolute !important;
left: 50% !important;
transform: translateX(-50%) !important;
width: min(720px, calc(100vw - 520px)) !important; /* leaves room for left+right UI */
margin: 0 !important;
}
/* Keep the search vertically aligned */
.mw-header .vector-search-box {
top: 50% !important;
transform: translate(-50%, -50%) !important;
}
/* Ensure user tools stay right and above any overlap */
.mw-header .vector-user-links,
.mw-header .mw-header-user,
.mw-header .vector-user-menu,
.mw-header .vector-user-menu-container {
position: relative !important;
z-index: 2 !important;
}
/* Ensure logo/menu stays left and above any overlap */
.mw-header .mw-logo,
.mw-header .mw-header-start,
.mw-header .vector-header-start {
position: relative !important;
z-index: 2 !important;
}
@media (max-width: 900px) {
.mw-header .vector-search-box,
.mw-header #p-search {
position: static !important;
transform: none !important;
width: 100% !important;
margin: 8px 0 0 !important;
}
}