Fandom

Community Central

Admin Forum:CSS table custom class help

19,020pages on
this wiki
Add New Page
Talk0 Share

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

This Forum has been archived

Forums: Admin Central Index Technical Help CSS table custom class help
Central's forums are a place for the community to help other members.
To contact staff directly or to report bugs, please use Special:Contact.
Note: This topic has been unedited for 1371 days. It is considered archived - the discussion is over. Do not add to unless it really needs a response.


I'm looking to set up a custom css class table style in MediaWiki:Common.css at F1 Wiki but I don't know anything about css. These are the parameters I need:

  • style name: resultsgrid
  • style="text-align:center; font-size:80%; width:100%; border:1px solid black;"
  • Table headers (cells beginning with "!"):background-color:AliceBlue
  • Table body:background-color:Bisque

I know I could do this manually on each table, but since it will be used on around 60 pages, I'd like to create a custom class for it.

Also, does anyone know of any good resources for learning css?

Thanks.

MTracey1 PSN/XBL: Mackem1985 {{SUBST:MTracey1Sig}} 23:14, July 6, 2012 (UTC)


A very good resource for learning CSS would be http://www.w3schools.com/css/

To answer your specific request, I set up a test page so you can see it here. The CSS you want to add to your Common.css stylesheet should be the following (let me know if it's not exactly what you were looking for):

table.resultsgrid {
    text-align: center;
    font-size: 80%;
    width: 100%;
    border: 1px solid black;
}
table.resultsgrid th {
    background-color: AliceBlue;
}
table.resultsgrid tbody {
    background-color: Bisque;
}

Hope that helps a bit, and be sure to check out w3schools! I'd say it's a quite comprehensive resource and it can help you a lot if you put the time and effort in. 20px_Rin_Tohsaka_Avatar.png Mathmagician ƒ(♫) 01:33 UTC, Sat, 07 July 2012

Also on Fandom

Random Wiki