Wikia

Community Central

Admin Forum:Css code to expand a table automatically

Talk0
97,288pages on
this wiki

This Forum has been archived

Forums: Admin Central Index General Questions Css code to expand a table automatically
Wikia'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 655 days. It is considered archived - the discussion is over. Do not add to unless it really needs a response.

The following code in your MediaWiki:Common.css will make all tables expand, cover the right side-rail, if they are wide enough for the pop-out button shows up

.WikiaWideTablesWrapper canvas
  { display: none; }
 
.WikiaWideTablesWrapper > .table
  { overflow: visible; }
What I want to know is this:

Is there specific code that can be applied to a specific table class so that only that 1 table is shown expanded? Not every table on the wiki that is wide.

-- (M o r p h | C | T) 500 contributions and counting. 17:47, January 27, 2013‎ (UTC)

Yes, use an id on the table and specify an id in your CSS.
Table code: {| id="expandoTable1"
CSS:
#expandoTable1 { CSS stuff }
-- Fandyllic (talk · contr) 28 Jan 2013 5:35 PM Pacific

I thank you Fandyllic for your quick reply but what I was asking for is " What is the specific css code that I need to add to my table code that will make it auto pop-out " the code I posted above is not specific to any table -- all tables if they are wider than the wiki article space then they will pop-out over the right rail -- I wanted specific code to add to specific tables so only that one table will do so not all table or no tables.

I mean I need the specific { css stuff } that has to be applied.

-- (M o r p h | C | T) 500 contributions and counting. 01:52, January 29, 2013 (UTC)

As Fandyllic said, apply the id of expandoTable1 and remove the .WikiaWideTablesWrapper > .table and replce with

.WikiaWideTablesWrapper > table#expandoTable1
  { overflow: visible; }

Thanks that was what I needed to know. -- (M o r p h | C | T) 500 contributions and counting. 20:48, January 30, 2013 (UTC)


This did not work

I have tried

.WikiaWideTablesWrapper canvas
  { display: none; }
 
.WikiaWideTablesWrapper > .table#expanded
  { overflow: visible; }

and even

.WikiaWideTablesWrapper canvas#expanded
  { display: none; }
 
.WikiaWideTablesWrapper > .table#expanded
  { overflow: visible; }

In the table I used:

{| id="expanded" class="wikitable"

And the table still does not expand over the right side-rail. -- (M o r p h | C | T) 500 contributions and counting. 21:11, January 30, 2013 (UTC)

If a table is too wide to fit in the left main column, it should automatically give a button to expand in a popup window outside the rail.
It would really help if you gave links to what you're working on. -- Fandyllic (talk · contr) 30 Jan 2013 1:57 PM Pacific
I am the admin of 2 different wiki's with 2 different table preferences
On the Ikariam wiki we have this code in the MediaWiki:Common.css
.WikiaWideTablesWrapper canvas
  { display: none; }
 
.WikiaWideTablesWrapper > .table
  { overflow: visible; }
If you look at this page w:c:ikariam:Building:Warehouse/0-10 you will notice that the table is FULLY expanded over the right rail -- you do not have to click on the button -- but any and all tables that are wider than the standard page size will automatically do this.
On the FarmVille wiki we want to make only 1 specific table class do this -- not every table that is too wide. The other tables we want you to click on the button to make the table shadow box show up to see the full table.
We are wanting this on this specific table found at w:c:farmville:Template:Tree Table
-- (M o r p h | C | T) 500 contributions and counting. 22:38, January 30, 2013 (UTC)
Ikariam wiki is clearly violating Wikia's Terms of Use by making any tables expand to cover the sidebar. It is usually better just to shrink the contents of the table than to try to make it stay expando and risk the wrath of Wikia's ToU police (although they are really, really lazy). Or you could request more main content width for your wiki, but Wikia is likely to turn you down cold (they're nice that way). -- Fandyllic (talk · contr) 31 Jan 2013 4:41 PM Pacific
You are right but you are wrong -- that link I sent you is to the page that has the table but that page is strancluded onto other pages via tabber and the tables are below the article text which moves the page down lower so that when it is expanded it does not cover anything in the right rail
All of this is totally off point -- Is there CSS code that I can apply to individual tables or as a ID that will cause 1 table type only - to expand all the way instead of ALL tables via the code posted at the top of the page???????
-- (M o r p h | C | T) 500 contributions and counting. 01:44, February 1, 2013 (UTC)

Around Wikia's network

Random Wiki