History: PluginDiv
Source of version: 22 (current)
Copy to clipboard
! Plugin Div Use this ((wiki plugin)) to define and format sections of a page or text. !! Parameters {pluginmanager plugin="div"} !! Controlling "Wrapping" If this plugin is used and the -+float+- parameter is used to align a block, then other elements on the page may "wrap" around that block. To avoid this or otherwise control the wrapping, the DIV plugin needs to be followed by another plugin or code that sets the clear property. Here are three ways to do this where all wrapping is stopped:%%% ||__Method__|__Syntax to avoid all wrapping__ ((PluginDiv))%%%''(starting with version 4)''| -+~np~ {DIV(clear="both")}{DIV} ~/np~+- ((PluginTag)) | -+~np~ {TAG(tag=br style=clear:both)}{TAG} ~/np~+- ((Dynamic Variable)) | Establish a variable like -+~np~ %clear% ~/np~+- and set to -+~np~ <br style="clear: both" /> ~/np~+-. To set its value, click on NaV the first time.|| The clear property can also be set to -+right+- or -+left+- as needed for desired effect. !! Examples !!! Type=div ''This code,'' {CODE(wrap="1" colors="tiki")} {DIV(float="right" width="200px" bg="#FFEBCD" align="center")} This section is a "div" that is 200 pixels wide, has a nice blanched almond background color, aligns to the right because float=right, with text that aligns center because align=center.{DIV} {CODE} ''Would produce:'' {DIV(float="right" width="200px" bg="#FFEBCD" align="center")} This section is a "div" that is 200 pixels wide, has a nice blanched almond background color, aligns to the right because float=right, with text that aligns center because align=center.{DIV} %clear% !!! Type=span ''This code,'' {CODE(wrap="1" colors="tiki")} With type=span, the text remains inline. {DIV(type="span" bg="yellow")} This text is in a "span" that is that is highlighted yellow.{DIV} And this text is after the span. {CODE} ''Would produce:''%%% With type=span, the text remains inline. {DIV(type="span" bg="yellow")} This text is in a "span" that is that is highlighted yellow.{DIV} And this text is after the span. %%% %%% {REMARKSBOX(type=tip title=Difference between "div" and "span")}These types are similar, but one of the main differences is that the "span" type can be used for inline text whereas the "div" type cannot. {REMARKSBOX} !!! Type=pre ''This code,'' {CODE(wrap="1" colors="tiki")} {DIV(type="pre" align="justify" bg="#D8BFD8" width="600px")} Using "pre" displays text in a fixed-width font, preserves spaces and any line breaks (enter was hit twice before "line"). The width only controls the color, not the text. {DIV} {CODE} ''Would produce:''%%% {DIV(type="pre" align="justify" bg="#D8BFD8" width="600px")} Using "pre" displays text in a fixed-width font, preserves spaces and any line breaks (enter was hit twice before "line"). The width only controls the color, not the text. {DIV} %%% {REMARKSBOX(type=note title=Note)} ((PluginCode)) or the ((Wiki-Syntax Text)) "~126~~110~~112~~126~~np~ your content ~/np~~126~~47~~110~~112~~126~" can also be used for similar effects and to display code without processing it.{REMARKSBOX} !!! Type=blockquote ''This code,'' {CODE(wrap="1" colors="tiki")} {DIV(type="blockquote" width="150px" align="justify")} Notice that blockquote indents the text. Here the width has been set at 150 pixels and the text is justified.{DIV} {CODE} ''Would produce:''%%% {DIV(type="blockquote" width="150px" align="justify")} Notice that blockquote indents the text. Here the width has been set at 150 pixels and the text is justified.{DIV} !!! Heading type {CODE(wrap="1" colors="tiki")} {DIV(type="h3")}Header level 3{DIV} {CODE} ''Would produce:''%%% {DIV(type="h3")}Header level 3{DIV} !!! Type=b, i, tt, These types are used to format text. Here are some examples: %%% ||__Type__|__Syntax__|__Result__ -+b+- | -+~np~ {DIV(type="b" bg="#F08080")}This text is bold and the background is misty rose.{DIV} ~/np~+- |{DIV(type="b" bg="#FFE4E1")}This text is bold and the background is misty rose.{DIV} -+i+- | -+~np~ {DIV(type="i" float="right")}This text is italic and floats right.{DIV} ~/np~+- |{DIV(type="i" float="right")}This text is italic and floats right.{DIV} -+tt+- | -+~np~ {DIV(type="tt")}This text is in teletype font.{DIV} ~/np~+- |{DIV(type="tt")}This text is in teletype font.{DIV}|| %%% {REMARKSBOX(type=note title=Note)} Consider using ((Wiki-Syntax Text)) if you just need simple text formatting and don't need other formatting like a background color or special alignment. {REMARKSBOX} !! Grid Display / Masonry %%% !! Related pages * ((Grid Display|Grid Display / Masonry)) * ((Wiki-Syntax Text)) * ((PluginTag)) * ((PluginCode))