Editing Template:Div col

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
<includeonly>
+
<includeonly><templatestyles src="Div col/styles.css"/>
 
<div class="div-col {{#ifeq:{{{small|}}}|yes|div-col-small}} {{#ifeq:{{{rules|}}}|yes|div-col-rules}}"  
 
<div class="div-col {{#ifeq:{{{small|}}}|yes|div-col-small}} {{#ifeq:{{{rules|}}}|yes|div-col-rules}}"  
 
{{#if:{{{colwidth|}}}{{{gap|}}}{{{style|}}}|
 
{{#if:{{{colwidth|}}}{{{gap|}}}{{{style|}}}|
 
style="{{#if:{{{colwidth|}}}|column-width: {{{colwidth}}};}}{{#if:{{{gap|}}}|column-gap: {{{gap}}};}}{{#if:{{{style|}}}|{{{style}}}}}"
 
style="{{#if:{{{colwidth|}}}|column-width: {{{colwidth}}};}}{{#if:{{{gap|}}}|column-gap: {{{gap}}};}}{{#if:{{{style|}}}|{{{style}}}}}"
 
}}>
 
}}>
{{#if:{{{content|}}}|{{{content}}}</div>}}
+
{{#if:{{{content|}}}|{{{content}}}</div>}} Inventory how many pages use small=yes
 +
{{#ifeq:{{{small|}}}|yes|[[Category:Pages using div col with small parameter]]}}
 
</includeonly>
 
</includeonly>
 
<noinclude>
 
<noinclude>
Line 12: Line 13:
 
===Descriptions===
 
===Descriptions===
 
There are six parameters for this template:  
 
There are six parameters for this template:  
: Specifies the minimum width of the columns so that the number of columns is automatically based on screen width (that is, more columns will be shown on wider displays). If no value is supplied, the template uses a default of 30em. The width can be specified in any CSS unit of measure, for instance, the em (about the width of the capital "M" of the displayed typeface), e.g., <code>colwidth=20em</code>.  
+
: Specifies the minimum width of the columns so that the number of columns is automatically based on screen width (that is, more columns will be shown on wider displays). If no value is supplied, the template uses a default of 30em. The width can be specified in any [[CSS#Length units|CSS unit of measure]], for instance, the [[Em (typography)|em]] (about the width of the capital "M" of the displayed typeface), e.g., <code>colwidth=20em</code>.  
 
: Adds vertical lines ("rules") between the columns if set to <code>yes</code>.  
 
: Adds vertical lines ("rules") between the columns if set to <code>yes</code>.  
 
: Specifies the space between the content of adjacent columns, in any valid CSS width unit, e.g., <code>gap=2em</code>. The default spacing (set by browser) is 1em.
 
: Specifies the space between the content of adjacent columns, in any valid CSS width unit, e.g., <code>gap=2em</code>. The default spacing (set by browser) is 1em.
Line 221: Line 222:
 
<pre>
 
<pre>
 
{{div col|colwidth=20em}} <!--Lorem ipsum -->
 
{{div col|colwidth=20em}} <!--Lorem ipsum -->
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam non congue felis. Ut nisi est, consectetur sit amet risus eu, condimentum efficitur risus. Vestibulum sed consectetur orci. In a elit feugiat, vestibulum lacus sed, finibus nunc. Donec gravida vel magna auctor imperdiet. Ut a bibendum elit, id placerat leo. Cras quis velit dapibus, aliquam ante ac, suscipit nibh. Cras laoreet leo eget elementum lacinia. Vivamus consectetur condimentum velit tincidunt auctor. Sed hendrerit dui vitae tortor volutpat, sit amet tempor libero convallis. Proin a lacinia tellus, eu ullamcorper libero. Maecenas sit amet ligula eu felis tempor faucibus. Quisque ultrices orci euismod metus vulputate, sed viverra urna aliquam.
+
{{lorem ipsum}}
 
{{div col end}}
 
{{div col end}}
 
</pre>
 
</pre>
 
Produces
 
Produces
 
{{Div col|colwidth=20em}}
 
{{Div col|colwidth=20em}}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam non congue felis. Ut nisi est, consectetur sit amet risus eu, condimentum efficitur risus. Vestibulum sed consectetur orci. In a elit feugiat, vestibulum lacus sed, finibus nunc. Donec gravida vel magna auctor imperdiet. Ut a bibendum elit, id placerat leo. Cras quis velit dapibus, aliquam ante ac, suscipit nibh. Cras laoreet leo eget elementum lacinia. Vivamus consectetur condimentum velit tincidunt auctor. Sed hendrerit dui vitae tortor volutpat, sit amet tempor libero convallis. Proin a lacinia tellus, eu ullamcorper libero. Maecenas sit amet ligula eu felis tempor faucibus. Quisque ultrices orci euismod metus vulputate, sed viverra urna aliquam.
+
{{lorem ipsum}}
 
{{Div col end}}
 
{{Div col end}}
  
Line 256: Line 257:
 
* h
 
* h
 
}}
 
}}
 +
 +
Turning off the {{code|break-inside: avoid-column;}} rule appears to help.<!-- A full page refersh is needed; just F12-ing doesn't work. -->
 
</noinclude>
 
</noinclude>

Please note that all contributions to OpenDominion may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see OpenDominion:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)

Templates used on this page: