FANDOM


(new topic)
 
Line 11: Line 11:
 
*Item C59999<span style="color:#aaa; float:right; display:inline; text-align:right;">· · · · · · · · · · · · · · · · · · · · · · · Category 2</span>
 
*Item C59999<span style="color:#aaa; float:right; display:inline; text-align:right;">· · · · · · · · · · · · · · · · · · · · · · · Category 2</span>
 
I want the items aligned all left, categories right, and both connected with dotted lines. But I don't get how to expand the dots to the end of text. Could someone give me a solution? {{User:Cafeinlove/Sig2|2012-04-22, 4:37 am}} 19:37, April 21, 2012 (UTC)
 
I want the items aligned all left, categories right, and both connected with dotted lines. But I don't get how to expand the dots to the end of text. Could someone give me a solution? {{User:Cafeinlove/Sig2|2012-04-22, 4:37 am}} 19:37, April 21, 2012 (UTC)
  +
:I was going to suggest the following script using the padding functionality, but it appears the padding functionality is not working on Wikia: <pre>{{{1|Item}}}{{#pad:{{{2|Category}}}|{{#expr:80-{{#len:{{{1|Item}}}}}}}|· |left}}</pre>
  +
:In order for this to work, a monospace font should be used. The 80 I used in the expression is an estimation of the amount of characters that fit in the width of the page using a monospace font. This can fluctuate because different operating systems can have different monospace fonts as defaults. Using a width of 70 or 75 over 80 may increase compatibility, but also leaves some more whitespace at the right margin. Please let me know if the padding functionality works on your Wiki, it does not work on The Elder Scrolls Wiki for unknown reasons, as all other string functions are working. ~ [[User:Flightmare|Flightmare]] 20:52, April 21, 2012 (UTC)

Revision as of 20:52, April 21, 2012

Forums: Index Support Requests CSS code problem
FANDOM's forums are a place for the community to help other members.
To contact staff directly or to report bugs, please use Special:Contact.

50px-Replacement filing cabinet.svg

Note: This topic has been unedited for 3001 days. It is considered archived - the discussion is over. Do not add to unless it really needs a response.


Please have a look on next template:

*Item<onlyinclude><span style="color:#aaa; float:right; display:inline; text-align:right;">· · · · · · · · · · · · · · · · · · · · · · · {{{1|Category}}}</span></onlyinclude>
  • Item A1011· · · · · · · · · · · · · · · · · · · · · · · Category 11
  • Item B22· · · · · · · · · · · · · · · · · · · · · · · Category 7
  • Item C59999· · · · · · · · · · · · · · · · · · · · · · · Category 2

I want the items aligned all left, categories right, and both connected with dotted lines. But I don't get how to expand the dots to the end of text. Could someone give me a solution?  Cafeinlove msg 2012-04-22, 4:37 am 19:37, April 21, 2012 (UTC)

I was going to suggest the following script using the padding functionality, but it appears the padding functionality is not working on Wikia:
{{{1|Item}}}{{#pad:{{{2|Category}}}|{{#expr:80-{{#len:{{{1|Item}}}}}}}|· |left}}
In order for this to work, a monospace font should be used. The 80 I used in the expression is an estimation of the amount of characters that fit in the width of the page using a monospace font. This can fluctuate because different operating systems can have different monospace fonts as defaults. Using a width of 70 or 75 over 80 may increase compatibility, but also leaves some more whitespace at the right margin. Please let me know if the padding functionality works on your Wiki, it does not work on The Elder Scrolls Wiki for unknown reasons, as all other string functions are working. ~ Flightmare 20:52, April 21, 2012 (UTC)
Community content is available under CC-BY-SA unless otherwise noted.