Hi there,
I have created a template over at http://moshimonsters.wikia.com/wiki/Template:Timeline?action=edit
When it shows up on articles, the last column is always huge. Is anyone able to fix this/tell me how to fix this?
thanks
Hi there,
I have created a template over at http://moshimonsters.wikia.com/wiki/Template:Timeline?action=edit
When it shows up on articles, the last column is always huge. Is anyone able to fix this/tell me how to fix this?
thanks
... ! scope="col" style="text-align:left;background-color:{{{themecolour}}};"|Date ! scope="col" style="text-align:left;background-color:{{{themecolour}}};"|Area ! scope="col" style="text-align:left;background-color:{{{themecolour}}};width:200px"|Event
Add the parameter "width" in styling. You can try changing the numbers.
Hi. Thanks, I've just tried that and I honestly see no difference. Do you know any other way I could fix?
I notice the 40 rows of dates have their widths set as
{{#if:{{{date1|}}}| {{!}}- {{!}}width="20%" height="1" data-sort-value="{{{datecode1|}}}"{{!}}{{{date1}}} {{!}}width="15%" {{!}}{{{area1}}} {{!}}width="65%" data-sort-value="{{{datecode1|}}}"{{!}}{{{event1|}}} }}
These needing changing to alter the width.
{{#if:{{{date1|}}}| {{!}}- {{!}}width="20%" height="1" data-sort-value="{{{datecode1|}}}"{{!}}{{{date1}}} {{!}}width="15%" {{!}}{{{area1}}} {{!}}width="65%" data-sort-value="{{{datecode1|}}}"{{!}}{{{event1|}}} }}
These needing changing to alter the width.
What do I change them to? :P
If possible could you give me an example of what the coding should look like?
Two options:
fixed width
the 3 columns have to equal 100% (currently 20%+15%+65%=100%). If you want the same width everytime the table is used, change column 1 (currently 20%) column 2 (currently 15%) column 3 (currently 65%) to the new widths.
variable width
I notice you changed the header width to {{{width|}}}px. So you could set the column widths so they can be changeable...
{{#if:{{{date1|}}}| {{!}}- {{!}}width="{{{column 1 width|}}}%" height="1" data-sort-value="{{{datecode1|}}}"{{!}}{{{date1}}} {{!}}width="{{{column 2 width|}}}%" {{!}}{{{area1}}} {{!}}width="{{{column 3 width|}}}%" data-sort-value="{{{datecode1|}}}"{{!}}{{{event1|}}} }}
fixed width
the 3 columns have to equal 100% (currently 20%+15%+65%=100%). If you want the same width everytime the table is used, change column 1 (currently 20%) column 2 (currently 15%) column 3 (currently 65%) to the new widths.
variable width
I notice you changed the header width to {{{width|}}}px. So you could set the column widths so they can be changeable...
{{#if:{{{date1|}}}| {{!}}- {{!}}width="{{{column 1 width|}}}%" height="1" data-sort-value="{{{datecode1|}}}"{{!}}{{{date1}}} {{!}}width="{{{column 2 width|}}}%" {{!}}{{{area1}}} {{!}}width="{{{column 3 width|}}}%" data-sort-value="{{{datecode1|}}}"{{!}}{{{event1|}}} }}
Hey, thanks, again. I don't know what you mean by "new widths", they have always been those.
I will try variable width although this is all really confusing for me.
Would you be able to code it for the first few rows and then I could see what the coding hould be like and then do it for myself?
thanks
You have changed the table to how I would have done it
{|cellborder="2" cellpadding="2" cellspacing="1" class="wikitable sortable" style="background-color: white; width:100%; font-size:85%;" |- ! scope="col" valign="top" style="text-align:left;background-color:{{{themecolor|}}};" |Date ! scope="col" valign="top" style="text-align:left;background-color:{{{themecolor|}}};" |Area ! scope="col" valign="top" style="text-align:left;background-color:{{{themecolor|}}};" |Event {{#if:{{{date1|}}}| {{!}}- {{!}}width="{{{widtha|}}}%" data-sort-value="{{{datecode1|}}}"{{!}}{{{date1}}} {{!}}width="{{{widthb|}}}%" data-sort-value="{{{area1|}}}"{{!}}{{{area1|}}} {{!}}width="{{{widthc|}}}%" data-sort-value="{{{datecode1|}}}"{{!}}{{{event1|<poem>{{{event1|}}}</poem>}}} }}
{{Timeline |themecolour = #ffff00 |widtha = 20 |widthb = 40 |widthc = 40 |date1 = July 2010 |datecode1 = 2010-07 |area1 = [[The DG]] |event1 = Something |}
Date | Area | Event |
---|---|---|
July 2010 | The DG | Something |
I'll try outthat coding! I actually reverted it to how it was prior, aha. But thanks for your help
Hi, TableWiz, sorry to bother again but I tried that code (with |} and }} at the end) as well as getting rid of the data-sorting for the area column, and it's still glitched.
I'm sure it's something I've done, I know you're a professional lol
Could you please tell me how I can fix this or could you fix it for me?
thanks a bunch :-D
Non of your edits made the template faulty. I have made an adjustment so new dates appear on a new row. It is displaying correctly on your page. (you may have to refresh the page if the change does not appear)
Brilliant! The last column is a little weird though? :P