Template:Div

From JoJo's Bizarre Encyclopedia - JoJo Wiki
Revision as of 20:55, 27 February 2024 by Paisley Park (talk | contribs)
Jump to navigation Jump to search
An alternative to the HTML
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 1

Content 2

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

And here is using this template instead:

Tab 1Tab 2
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>