Forum:Infobox Issues with gaps and

Hello! I feel like this is such an amateur issue, but I've been having problems with fixing up the infoboxes on my wiki. I was trying to make an infobox for images so I could start categorising and licensing pictures now that they're still in the hundreds, but the sizes of the infobox are not working for me, and it seems like the #if values are acting up as well.

, the information that isn't filled out doesn't show, like it should, but there is a gap between the first and second line. , the unfilled values still show up despite me using the same template on both files.

This is the infobox in question, which also refuses, for some reason, to make the left-hand side of the values (the ones titling the values like "Description", "Episode", etc.) smaller than the right-hand side for additional space.

I wouldn't want to change anything colour-wise with the template since it's the same colour scheme I use for character infoboxes, but I've been trying to fix the infobox for two days and I can't figure out what I'm doing wrong.

Thank you in advance!

Steel (talk) 11:52, October 15, 2011 (UTC)


 * The gap between filled out lines appears because the template loads each row regardless if the content of that row will be styled with "display:none" or not. You should include the whole row into the #if: parser function if you want to fix it.


 * The second issue was caused by the fact that some template parameters weren't named properly. I took the liberty of fixing that.


 * Not sure what you mean with the third issue, but both the left and right table cells have the same font-size which is 8pt. The left-side cells are bold because the headers are in triple single-quotes:  = EXAMPLE.


 * — Sovq 12:24, October 15, 2011 (UTC)


 * Ah yes, I noticed the edit for my second issue and felt silly that I'd let something so obvious slip past me. Thank you very much for that!


 * As for the first issue, I'm not sure how to include the entire row into the #if: parser function. How would I be able to do that, if you know?


 * And for the third, I'm sorry I was unclear. I would like to keep them the same font-size and the left-side cells bold. My issue is the width of the left-hand cells themselves, which seem to extend far more than what is needed. That then leaves a large gap between the left- and right-hand cells, space that could be used more effectively for the right-hand side.


 * I hope I'm clearer in my description now. Thank you again for helping me out!


 * Steel (talk) 12:38, October 15, 2011 (UTC)


 * I imagine replacing:


 * valign="top" style="width:100px;font-size:8pt" | Episode
 * valign="top" style="width:500px;font-size:8pt" class="infoboxcell" |
 * valign="top" style="width:500px;font-size:8pt" class="infoboxcell" |
 * with




 * and accordingly for other table rows would solve the first issue.


 * Now I see what you meant with the third issue. It's caused by the width:40% and width:60% styles added to the "disclaimer" section of the template. Removing these rules should do the job. Also, you only need to add one width:XX rule to any cell in a column to make the column that wide - I'd recommend doing so to keep the code clean. — Sovq 16:53, October 15, 2011 (UTC)


 * Oh, I see. I can't believe I missed that again! Thank you for pointing it out! Now I fixed the values and am happy with the width. But oddly, even though I cleaned up the code and added the new one you gave me, the gap between the unfilled cells and the rest is even bigger than before.


 * I'm probably overlooking something again, but would you mind taking another look? Thank you once again!


 * Steel (talk) 17:23, October 15, 2011 (UTC)


 * 1- There are several ways to make a part of the content of a wiki not show. For your case the if that you are using is the proper thing but using display: none; is a sloppy way to do it.
 * The best way to do it is to use proper html and put the whole row and all the cells in that row, inside the if.


 * 3- All those rows have a width of 100px for the first column and 500px for the second column. And that is defined in every row.
 * Then at the last row, the one with the disclaimer, you make the left column have a width of 40% and the right column have a width of 60%. That makes all the previous rows have 40% and 60% width and, in fact, ignore the 100px/500px declaration. You have to make up your mind, either it's all at 100/500 or all at 40%/60%.
 * Of course there are ways to make the first rows to have a width for each cell and the last row to have a different width. For that you need to make the last row a table, that way you will have a table inside the big table. But I don't think that's what you want so I won't explain it further.


 * Other stuff:
 * 4- there is no float:center, just float:left and float:right.
 * What you want to do here is probably achievable by putting  in the style declaration of the table.
 * 5- I think the valign in each and every cell is too much, you can declare it once for the whole row by putting the valign after the  that closes the previous row.