Monobook label fix[]
There is a problem with displaying labels in monobook. They have too much top padding and might have bold applied twice.
To fix it take out any bold markers affecting the labels in the template page and put this in your Monobook.css. Adjust font-size as required.
/* Portable infobox label column */ .portable-infobox .pi-data-label { padding-top: 0px; font-size: 12px; }
This code that I used may or may not also help:
/* Change infobox elements paddings: */ .portable-infobox .pi-item-spacing { padding-top: 0.3em; padding-right: 0.6em; padding-bottom: 0.1em; padding-left: 0.6em; } /* Change infobox data values font size: */ .portable-infobox .pi-font { font-size: 12px; } /* Portable infobox title */ .portable-infobox .pi-title { padding-top: 0em !important; padding-bottom: 0em !important; }
--Jade Raven (talk to me) 10:39, October 27, 2015 (UTC)
- Thanks for bringing this to our attention! I'll pass a note along to the technical team for them to review. Kirkburn talk contr 15:38, October 27, 2015 (UTC)
How?[]
CSS:
How to define the name of the template?
.portable-infobox.pi-background { background-color: #ff0000; }
Is it right if I want my infobox to be called nation-infobox?
.nation-infobox.pi-background { background-color: #FFFFFF; }
So in frontend, this is what I need to do?
<infobox theme="nation-infobox">
XP Mai (talk) 00:13, November 21, 2015 (UTC)
- Not quite - Help:Infoboxes/CSS#Using_.22theme.22 shows how to do give an infobox a specific class.
theme="nation-infobox"
would give you a class of.pi-theme-nation-infobox
Kirkburn talk contr 14:23, November 23, 2015 (UTC)
Actually adding CSS[]
Where and how do you actually add the CSS to the infobox source? I've been trying on this template here and all it shows is the CSS bit on the infobox page and and wherever the infobox is, not actually customizing the infobox. ZioreRogue (talk) 05:49, January 16, 2020 (UTC)
- You're supposed to add the CSS on your wiki's CSS, not on template page. See Help:Community CSS and JS#CSS for more information. CrazyForMyself (talk) 05:56, January 16, 2020 (UTC)
- And what if I can't access that page, since I'm a regular user? Is there another way to do this? ZioreRogue (talk) 07:36, January 16, 2020 (UTC)
- Unfortunately that's one of the disadvantages of portable infoboxes. Only Administrators are able to fully customise them. So you'll have to ask an administrator to add it for you. And if that doesn't work, then you're probably out of luck. ― C.Syde (talk | contribs) 08:01, January 16, 2020 (UTC)
- There aren't any active admins on that wiki, so I really am out of luck. Gaargh! ZioreRogue (talk) 08:50, January 16, 2020 (UTC)
- Oh, that's a bothersome situation. If you like, you can consider adopting the wiki. You'll be able to add it yourself then. CrazyForMyself (talk) 09:07, January 16, 2020 (UTC)
- There aren't any active admins on that wiki, so I really am out of luck. Gaargh! ZioreRogue (talk) 08:50, January 16, 2020 (UTC)
- Unfortunately that's one of the disadvantages of portable infoboxes. Only Administrators are able to fully customise them. So you'll have to ask an administrator to add it for you. And if that doesn't work, then you're probably out of luck. ― C.Syde (talk | contribs) 08:01, January 16, 2020 (UTC)
- And what if I can't access that page, since I'm a regular user? Is there another way to do this? ZioreRogue (talk) 07:36, January 16, 2020 (UTC)
Mobile CSS when using Theme[]
It may be worth noting that to add infobox theming on mobile by using a theme, such as <infobox theme="npcbox">
, the CSS is actually applied to the aside
element instead of the portable infobox element in FandomMobile.css; e.g. portable-infobox-wrapper > aside.pi-theme-npcbox
. - JaneBuzJane 15:48, 4 January 2024 (UTC)