Template:Div

From JoJo's Bizarre Encyclopedia - JoJo Wiki
Jump to navigation Jump to search

An alternative to the HTML <div> tags, useful for using them within templates without potential issues.

For example, here is what happens if you try to use Template:Tabber with divs:

Tab 2

{{Tabber
|Tab 1|
<div style="color:red">Content 1</div>
|Tab 2|
Content 2
}}

And here is using this template instead:

Content 1

Content 2

{{Tabber
|Tab 1|
{{div|Content 1|style="color:red"}}
|Tab 2|
Content 2
}}

Parameters

1     = Content to be wrapped in div tags.
id    = ID to apply to div content.
class = Class(es) to apply to div content.
style = Style(s) to apply to div content.

Usage

Example:
Good grief.
{{div|Good grief.|class=example example2|style=color: red; font-style: italic; font-size: 20px}}

Equivalent:

<div class="example example2" style="color: red; font-style: italic; font-size: 20px">Good grief.</div>