Forum:Shrinking the TOC box

Hi again! I'd like to ask if there's any way to shrink the Table of Contents box that appears on pages with numerous sections. As it is right now, The box is so big that the top of the article is way too crowded Thanks in advance!


 * Is this what you're looking for? Hunter789 01:25, August 24, 2011 (UTC)

Hopefully it could apply to all pages on the wiki.
 * Well, What I meant was that I wanted a Css or js code to shrink the box, not just reduce its height. Sometimes the box is so wife that it pushes the entire article down. Here's an example of what I'm saying: Clickey!.

Here's the guts of a solution we use at w:c:tardis: .WikiaArticle .toc { right:250px; width:250px; min-width:250px; max-width:250px; border-collapse:separate; } As I recall, that's not as "clean" is it could be. That is, not all those declarations are necessary. But this does effectively limit the size of the TOC to the max width of our infoboxes.

I wish I could remember which part of this code wasn't necessary. I think it's the min-width and max-width stuff. I'm pretty sure that once you define the right as 250px the min/max stuff is irrelevant. Or maybe it's the other way round. Anyway, we use that and effectively curb our TOC widths. Problem is (for us), that we still sometimes have TOCs that go under 250px, and I'd rather every box be 250px. But still, nothing goes over 250px.

Now, we do a bit more than that to our TOCs but that's the basics of limiting the width. You can see it in operation at, for example, tardis:United States of America or, if you want to see how our TOC's play with templates and infoboxs, you could go to tardis:The Master. Please note that we are a TOC:right wiki, so our TOCs tuck underneath our infoboxes. In other words, you might have to scroll down a bit to see them. 00:25:27 Thu 25 Aug 2011