Gamepedia Help Wiki
Advertisement

Header elements

Identifier Description Software defaults Recommendations
div#mw-page-base Empty header element that influences top position of sidebar and content.
  • This is one available option for a background for the header. Useful if the desired background size will be different than that of #mw-head.
  • Adjusting height, vertical margins, or vertical padding will adjust top position of sidebar and content.
div#mw-head-base Empty header element that influences top position of sidebar and content.
  • Set display: none; and add extra height to #mw-page-base to avoid inconsistent vertical positioning of sidebar and content between browsers. Important if you need pixel-perfect positioning.
div#mw-head Actual container for the page navigation bar.
  • This is not in normal flow and won't affect content or sidebar position.
  • It's easiest to set this to the same height as #mw-page-base, but margins or positioning can be used if border, backgrounds, or other effects are desired around the entire page actions bar.
  • If using non-standard content width, you'll probably need to set a width on this to match. In some cases, this may require a combination of positioning, matgins, padding, and/or width to achieve the correct effect.
#left-navigation Links for the content and talk page.
  • Position is relative to #mw-head.
  • Use top and left to adjust position.
  • left will usually be set to the width of the sidebar or greater, unless you choose to adjust #mw-head's position or margins instead (useful for certain effects).
  • Absolute units like pixels are recommended here to avoiding overlapping the logo/sidebar when users have nonstandard font settings. Relative units are used by default.
#right-navigation Container for page actions links and search controls.
  • Adjust position using margins.
div.vectorTabs Containers for: the content and talk page links; and the view, edit, and history links.
  • Be careful when making adjustments to margins, paddings, or font sizes in these elements, as they may end up overlapping when the browser window is narrow.
  • The Vector extension adds Javascript that can move links into the hover menu when there isn't enough width, but it does not consider margins or padding.
  • Has a background by default. You'll likely need to remove or override it.
div.vectorTabs li An outer container for a single page tab link.
  • Has a background by default. You'll likely need to remove or override it.
div.vectorTabs li.selected An outer container for a selected single page tab link.
  • Has a background by default. You'll likely need to remove or override it.
div.vectorTabs li span An inner container for a single page tab link.
  • Has a background by default. You'll likely need to remove or override it.
div.vectorTabs li span a A page tab link.
  • Has height set in relative units. This may need to be changed to absolute units depending on height of the header.
div.vectorTabs li.new span a A page tab link for a page that doesn't exist.
div.vectorMenu Container for the hover menu and its arrow. Also has the background image for the arrow.
  • If the height for the tab links has been adjusted, height here should generally be adjusted to match.
div.vectorMenu h5 Left border for the hover menu arrow provided by background image.
  • The background will likely need to be removed.
div.vectorMenu h5 a Provides a background for the hover image.
  • The background will likely need to be removed.
div#p-cactions div.menu Container for the hover menu (only the part that appears when hovering over the arrow).
  • If desired, adjust its position with left, top, right, or bottom.
  • Set a high z-index to prevent the menu from closing while the mouse cursor is still over it. A really high value like 3000 gives you plenty of room to adjust z-index elsewhere if you so desire.
div#p-cactions div.menu ul The list of links in the hover menu.
  • The default background and border are defined here and thus best overridden here if desired.
div#p-cactions div.menu ul li a A link in the hover menu.
  • Spacing between the links can be adjusted with vertical padding or margins.
#p-search Outer container for the search box and buttons.
#p-search form Inner container for the search box and buttons.
  • If trying to adjust the vertical position of the search box and buttons, start by adjusting line-height. This can help improve positioning across browsers due to line-height's vertical centering effect.
  • It is sometimes helpful to make div.vectorTabs taller, move #left-navigation and #right-navigation up by the same amount, add that amount of top margin to the actual tabs, and allow #p-search to be the same height as div.vectorTabs without any vertical margins or padding. This is helpful if you'd prefer larger font sizes to expand the search box up rather than down.
#searchInput The search box
  • Useful if you want the search box to have a different appearance than other textboxes. Otherwise, it's best to leave it alone.
#p-search input[type="submit"], #p-search input[type="button"], #p-search input[type="reset"] The search buttons
  • Useful if you want the search buttons to have a different appearance than other buttons. Otherwise, it's best to leave this alone.
.os-suggest The search suggestions popup box.
.os-suggest-result A single search suggestion item.
  • Has a background color set by default. If you're styling search suggestions, you'll probably need to override it.
.os-suggest-result-hl The highlighted single search suggestion item.

Logo and sidebar elements

Identifier Description Software defaults Recommendations
div#mw-panel The sidebar, including the logo.
  • Set to same width as logo or make larger. Reposition using margins if needed.Absolute units like pixels are recommended here to avoiding overlapping the logo/sidebar when users have nonstandard font settings. Relative units are used by default.
  • overflow: visible will ensure logo remains visible if it is positioned partly or fully outside the sidebar.
#p-logo Container for the logo link. Located at top of div#mw-panel.
  • Set to same width and height as logo. Reposition using top and left.
#p-logo a The logo link, containing the logo as a background.
  • Set to same width and height as logo.
div#mw-panel div.portal Container for a single header and its associated links.
div#mw-panel div.portal h5 Header for a list of links in the sidebar.
div#mw-panel div.portal div.body Container for a single list of links in the sidebar.
div#mw-panel div.portal div.body ul li a Links in the sidebar.

Content elements

Identifier Description Software defaults Recommendations
#pageWrapper Outer wrapper around page content and footer.
  • The left padding for this element is what makes space for the sidebar. Absolute units like pixels are recommended here to avoiding overlapping the logo/sidebar when users have nonstandard font settings. Relative units are used by default.
  • If you want a background for the sidebar that extends all the way to the Curse footer, using this is an option. Note that the background will also be behind the page content and footer, but you can hide it with backgrounds on those.
div#content Container for the page content.
div#content #firstHeading The page title.
  • This will also pick up styles for h1, but you may want less top margin for this than headings in the actual text.
div#content h1, div#content h2, div#content h3, div#content h4, div#content h5, div#content h6 Headings in the article.
  • Setting overflow: auto; makes any backgrounds or borders of headings respect floating elements. This reduces the need to use clear to push article sections beneath floating elements.
  • Due to strange behavior in many versions of IE, if you use overflow: auto, you'll need around 5px of padding-bottom to prevent scroll bars from appearing on some headings.
div#content #firstHeading The page title.
  • This will also pick up styles for h1, but you may want less top margin for this than headings in the actual text.
span.editsection The edit links in headings.
  • Styles for headings affect this as well. There may be cases where you want to apply styles to make this look like normal text rather than heading text.
.toc, #toc Table of contents box.
  • This is, for some reason, a single-cell table, unlike most boxes which are simply divs, but the default border and background are applied here. Note that some CSS values, like width: auto;, work differently on tables than they do on divs.
  • The contents of this box are inside a tr and td. They have no styles by default, but it's possible someone may have added them. It's probably best to move any such styles to this instead.
div#content #toctitle h2 Table of contents heading.
  • Removing any heading border or background is often a good idea for this, depending on the skin design.
.toctoggle, #toc .toctoggle Table of contents heading.
  • Styles for headings affect this as well. There may be cases where you want to apply styles to make this look like normal text rather than heading text.
hr General horizontal line.
  • Most likely, this will be styled with border-bottom, though there are also other ways.
ul General unordered lists.
  • You can override the standard list-item-image bullet here.
table.wikitable Tables in content with the wikitable class.
  • Has a background by default that will often need to be overridden.
table.wikitable th Table header cells in tables with the wikitable class.
  • Has a background by default that will often need to be overridden.
table.wikitable td Table data cells in tables with the wikitable class.
  • Has a background by default that will often need to be overridden.
table.jquery-tablesorter th.headerSort Sortable table header cells.
  • The sort arrows are added to this as a background. You can override this with an up and down arrow image added as a background positioned at right center. This is typically necessary on dark skins.
table.jquery-tablesorter th.headerSortDown Sortable table header cells.
  • The up sort arrow is added to this as a background. You can override this with an up and down arrow image added as a background positioned at right center. This is typically necessary on dark skins.
table.jquery-tablesorter th.headerSortUp Sortable table header cells.
  • The down sort arrow is added to this as a background. You can override this with an up and down arrow image added as a background positioned at right center. This is typically necessary on dark skins.
ul.gallery Container for a standard image gallery.
li.gallerybox Outer container for an image in a standard image gallery. Contains image and caption.
li.gallerybox div.thumb Inner container for an image in a standard image gallery. Contains just the image.
  • Take care if adjusting margins or padding, as this can cause the inner box to extend out of the outer box or at least move it from center.
div.gallerytext Caption for an image in a standard image gallery.
.thumb Invisible outer container for a thumbnail created using the thumb argument in an image link.
  • Apply borders, backgrounds, and visual effects to div.thumbinner instead of this.
  • Apply any margin adjustments to .thumb.tleft and .thumb.tright instead.
.thumb.tleft Invisible outer container for a thumb that's floated to the left.
  • Margin adjustments should be done here. Be sure to leave some right margin to keep some space between thumbnails and text.
.thumb.tright Invisible outer container for a thumb that's floated to the right.
  • Margin adjustments should be done here. Be sure to leave some left margin to keep some space between thumbnails and text.
div.thumbinner Container for a thumb around both image and caption.
  • You may want to change the default border and background for this.
html .thumbimage Container for the thumb image.
  • You may want to change the default border and background for this.
.thumbcaption The caption for a thumb image.
pre Preformatted text.
  • There is a background and dashed border for this by default in MediaWiki.
  • white-space: pre-wrap; and word-wrap: break-word; are highly recommended to prevent long lines from exceeding the content area width.
#catlinks The container for the category links.
  • Unlike most "boxes", this one should have some top margin.

General interface elements

Identifier Description Software defaults Recommendations
input[type="text"], input[type="password"], input[type="file"], select, textarea Various text and list boxes found throughout MediaWiki.
button, input[type="submit"], input[type="button"], input[type="reset"] The various buttons found throughout MediaWiki.
.usermessage The "You have new messages" box that appears after your user talk page is edited.
div.mw-warning Not entirely sure where this shows up...
div.mw-warning-with-logexcerpt A box that appears on deleted and protected pages when being edited that shows one or more log entries.
div#content fieldset Boxes with controls that appear on many pages. One obvious example is the one on of Special:RecentChanges that contains link to adjust what entries are shown.
  • Unfortunately, box-shadows appear at the edge of the actual box above the legend, not where the top border appears.
div#content fieldset legend The title for a fieldset box.

Search page elements

Identifier Description Software defaults Recommendations
.mw-search-formheader Box on search page containing the "Content pages", "Multimedia", etc. links.
.mw-search-formheader div.search-types ul li.current a The selected search-type.
  • You'll likely want to change this to match the color scheme. This will certainly need to be changed on dark skins.
Advertisement