Fandom

Community Central

Help talk:Infoboxes/CSS

English

Talk:Infoboxes/CSS

Back to page | < Help talk:Infoboxes

19,805pages on
this wiki
Add New Page

Monobook label fixEdit

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  @fandom  15:38, October 27, 2015 (UTC)

How?Edit

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  @fandom  14:23, November 23, 2015 (UTC)