Misplaced Pages

Template:Navigation with columns: Difference between revisions

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
Browse history interactively← Previous editNext edit →Content deleted Content addedVisualWikitext
Revision as of 05:14, 13 February 2007 editDavid Kernow (talk | contribs)40,997 edits +alternate parameters← Previous edit Revision as of 15:55, 20 February 2007 edit undoDavid Kernow (talk | contribs)40,997 edits recoded template, removing use of -moz-column-count and column-count stylesNext edit →
Line 4: Line 4:
########################################################################### ###########################################################################
--></noinclude><includeonly><!-- --></noinclude><includeonly><!--

--><div class="NavFrame" style="clear:both;"> --><div class="NavFrame" style="clear:both;">
<div class="NavHead" {{#if:{{{color|}}}|style="background-color: {{{color}}};"}}> {{Tnavbar|{{{name|}}}|mini=1|style=position:absolute; width:auto; left:0.5em;}} '''{{{title}}}'''</div> <div class="NavHead" {{#if:{{{titlebkg|}}}|<!--then:-->style="background:{{{titlebkg}}};"}}> {{Tnavbar|{{{name|}}}|mini=1|style=position:absolute; width:auto; left:0.5em;}} '''{{{title}}}'''</div>
<div class="NavContent" style="margin:0.5em; font-size:0.9em;"> <div class="NavContent" style="margin:0.5em; font-size:0.9em;">
{{{above|}}}{{{top|}}} {{{above|}}}{{{top|}}}<!--
------------------------------Table carrying columns------------------------------
<div style="padding-left:{{#expr:100/(2*({{{cols|4}}}+1))}}%;"><!--Calculate padding-left depending on number of cols-->
<div style="-moz-column-count:{{{cols|4}}}; column-count:{{{cols|4}}}; text-align:left;"> --><table style="width:100%; background:{{{colsbkg|transparent}}}; cellspacing:0; cellpadding:0; text-align:left;">
<tr valign="top">
{{{body|}}}
{{#ifexpr:{{{minw|14}}}>{{#expr:100/({{{cols|2}}}+1.5)}}<!--
</div><!--end columns--></div><!--end padding div-->
i.e. if the minimum %width specified for the columns is greater than the width calculated,
{{{below|}}}{{{bottom|}}}<!--
-->|<!--then:---------------build table using {{{minw}}}:-----------
--><td width="{{#expr:{{{minw|14}}}/2}}%"><!--padding (see /doc)--></td><!--
---required--col1-----><td width="{{{minw|14}}}%">{{{col1}}}</td><!--
---required--col2-----><td width="{{{minw|14}}}%">{{{col2}}}</td><!--
--->{{#if:{{{col3|}}} |<td width="{{{minw|14}}}%">{{{col3}}}</td>}}<!--
--->{{#if:{{{col4|}}} |<td width="{{{minw|14}}}%">{{{col4}}}</td>}}<!--
--->{{#if:{{{col5|}}} |<td width="{{{minw|14}}}%">{{{col5}}}</td>}}<!--
--->{{#if:{{{col6|}}} |<td width="{{{minw|14}}}%">{{{col6}}}</td>}}</tr><!--

-->|<!--else:-------build table using calculated column width:-------
--><td width="{{#expr:100/({{{cols|2}}}+1.5)}}%"><!--padding; see /doc--></td><!--
---required--col1-----><td width="{{#expr:100/({{{cols|2}}}+1.5)}}%">{{{col1}}}</td><!--
---required--col2-----><td width="{{#expr:100/({{{cols|2}}}+1.5)}}%">{{{col2}}}</td><!--
--->{{#if:{{{col3|}}} |<td width="{{#expr:100/({{{cols|2}}}+1.5)}}%">{{{col3}}}</td>}}<!--
--->{{#if:{{{col4|}}} |<td width="{{#expr:100/({{{cols|2}}}+1.5)}}%">{{{col4}}}</td>}}<!--
--->{{#if:{{{col5|}}} |<td width="{{#expr:100/({{{cols|2}}}+1.5)}}%">{{{col5}}}</td>}}<!--
--->{{#if:{{{col6|}}} |<td width="{{#expr:100/({{{cols|2}}}+1.5)}}%">{{{col6}}}</td>}}<!--
---><td><!--padding; width should be be half the padding above (see /doc)--></td></tr><!--

---end #ifexpr:-->}}
</table><!--
------------------------------------end of table----------------------------------
-->{{{below|}}}{{{bottom|}}}<!--
-->{{{cat|}}}{{{category|}}}<!-- -->{{{cat|}}}{{{category|}}}<!--
--></div><!--end NavContent--></div><!--end NavFrame--></includeonly><noinclude> --end NavContent:--></div><!--
----end NavFrame:--></div><noinclude><!--



{{{{FULLPAGENAME}}/doc}} -->{{{{FULLPAGENAME}}/doc}}
<!--NB Add metadata to the /doc page linked above, not here; thanks!--> <!--NB Add metadata to the /doc page linked above, not here; thanks!-->
</noinclude> </noinclude>

Revision as of 15:55, 20 February 2007