Access Keys:
Skip to content (Access Key - 0)

Adaptavist Documentation Move

This documentation is deprecated. Adaptavist's documentation has moved to a new location where it is maintained and updated. Please visit Adaptavist's new Documentation area.

div macro

Overview:

The {div} macro wraps content in a div tag with optional class and styles...

The div tag is a non-visual (by default) element that can be used to apply additional properties to content contained within it.

Unlike the span tag, a div stretches to fill the available width of it's containing element making it ideal for use with blocks of content such as a whole paragraph.

This macro is primarily designed for use with the style macro as this would make it easy to apply custom styles to your content. Alternatively you can specify specific styles for each use of the macro.

Parameters:

Add the macro to your page as follows:

{div:class=x y z|style=css}
your content
{div}
At least one parameter must be specified
You must specify at least one of the parameters below for this macro to work.
Parameter Required Default Notes
id   An optional id value to apply to an individual div tag.
class   The class to associate with the div. Multiple classes can be specified by separating them with spaces.
style   An optional inline style sheet to apply to an individual div tag.

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 nested DIVs aren't displaying properly
A Confluence doesn't support nested tags, so the following were created to support nested DIVs:
  • {div2}
  • {div3}
  • {div4}
  • {div5}
  • {div6}
  • {div7}
  • {div8}
  • {div9}
    They are duplicates of the div macro, and support the same parameters.
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.

See Also:



View old comments


Adaptavist Theme Builder Powered by Atlassian Confluence