Access Keys:
Skip to content (Access Key - 0)
Home (Access Key - 1)
All spaces... (Access Key - 3)
Log in (Access Key - 5)
Sign up (Access Key - 6)
Toggle Sidebar

div macro


{div} Macro

Examples

Hints and Tips

If you are using the same inline style several times, create a stylesheet for the class using either the style macro or the CSS Custom Styles feature of the Builder theme.

Frequently Asked Questions

Q Where can I learn more about CSS and Div tags?
A Try http://www.w3schools.com as they have full tutorials on CSS and HTML.
Q My div tag is outputting </div> at the start instead of <div> - why?
A You must specify one or more of the parameters (style and/or class) for the macro to work properly.
Toggle Sidebar

See Also

Incoming Links


Outgoing Links


Added by Guy Fraser on Nov 14, 2005 17:30, last edited by Guy Fraser on Jul 21, 2008 19:03
Anonymous

Can you please provide an example with multiple inline style decorations? I understand we can use a style sheet but...

Example (that's not working):

\{div:style=background:#F0F0F0|border:1px solid #333399|left:1em|right:1em\}
loremipsum
\{div\}

Is only the first style declaration valid?

Thanks,
Liberty Miller, 2006-12-04

The style param is the same as the standard HTML style attribute so you need something like:

{div:style=background:#F0F0F0;border:1px solid #333399;left:1em;right:1em} 
loremipsum 
{div}

The CSS atribs are split by semi-colons, not pipes.

I'm having trouble nesting the div macro. The nested div macro seems to close out it's parent before it acts on the text. We are using

I see the FAQ above and have supplied a style parameter on each one. Does the macro support nesting?

Here is an example:
{div:style=width:100%}
{div:style=background-color:lightgreen}header{div}
{div}

Confluence doesn't support nesting of macros, unfortunately. That's why we added div2, div3 and div4, etc., macros in to the plugin

{div}
 {div2}div 2 content{div2}
 etc.
{div}

Thanks so much for your quick reply. The div2 and div3 macros work fantastic. I will have to get our Wiki team to document them.


Adaptavist Theme Builder Powered by Atlassian Confluence