Loading...
 
Define and format sections of a page or text

Plugin Div

Use this wiki plugin to define and format sections of a page or text.

Parameters

Define and format sections of a page or text
Introduced in Tiki 1.
Go to the source code
Preferences required: wikiplugin_div

Parameters Accepted Values Description Default Since
(body of plugin) text
width text In pixels or percentage. Default is original size 1
class text Apply custom CSS class to the div. 1
id text Sets the id attribute of the div, as defined by HTML. 1
role text e.g. button, heading, search etc. 19.0
style text Enter CSS styling tags for the div type used. 13.0
title text Title for the div, usually displayed as a tooltip. 9.2
onclick text Enter on onclick event 14.0
aria text URL encoded list or attributes and values, e.g. label, expanded etc. 19.0
bg Valid CSS color name or hex code As defined by CSS, name, or color hex code. 1
clear (blank)
right
left
both
none
Content cannot wrap around this object because of what the parameter is set to. 1
data text URL encoded list or attributes and values. 19.0
float (blank)
right
left
none
Set the alignment for the entire element. For elements with a width of less than 100%, other elements will wrap around it unless the clear parameter is appropriately set. 1
align (blank)
left
right
center
justify
Aligns the text within the element 1
type (blank)| div| span| section| aside| header| footer| pre| strong| em| tt| p| blockquote| h1| h2| h3| h4| h5| h6 Indicate the type of HTML tag to use (default is div) div 1

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:

MethodSyntax to avoid all wrapping
PluginDiv
(starting with version 4)
{DIV(clear="both")}{DIV}
PluginTag {TAG(tag=br style=clear:both)}{TAG}
Dynamic Variable Establish a variable like %clear% and set to <br style="clear: both" /> . 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,

Copy to clipboard
{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}


Would produce:

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.


Type=span

This code,

Copy to clipboard
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.


Would produce:

With type=span, the text remains inline. This text is in a "span" that is that is highlighted yellow. And this text is after the span.



 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.

Type=pre

This code,

Copy to clipboard
{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}


Would produce:

 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.


 Note
PluginCode or the Wiki-Syntax Text "~np~ your content ~/np~" can also be used for similar effects and to display code without processing it.

Type=blockquote

This code,

Copy to clipboard
{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}


Would produce:

Notice that blockquote indents the text. Here the width has been set at 150 pixels and the text is justified.

Heading type

Copy to clipboard
{DIV(type="h3")}Header level 3{DIV}


Would produce:

Header level 3

Type=b, i, tt,

These types are used to format text. Here are some examples:

TypeSyntaxResult
b {DIV(type="b" bg="#F08080")}This text is bold and the background is misty rose.{DIV}
This text is bold and the background is misty rose.
i {DIV(type="i" float="right")}This text is italic and floats right.{DIV}
This text is italic and floats right.
tt {DIV(type="tt")}This text is in teletype font.{DIV} This text is in teletype font.


 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.

Grid Display / Masonry




Created by sylvie. Last Modification: Saturday 18 February, 2023 02:23:16 GMT-0000 by Marc Laporte.

doc.tiki.org

Get Started

Admin Guide User Guide

Keywords

Keywords serve as "hubs" for navigation within the Tiki documentation. They correspond to development keywords (bug reports and feature requests):

Accessibility (WAI and 508)
Accounting
Articles and Submissions
Backlinks
Banners
Batch
BigBlueButton audio/video/chat/screensharing
Blog
Bookmark
Browser Compatibility
Link Cache
Calendar
Category
Chat
Clean URLs
Comments
Communication Center
Compression (gzip)
Contacts (Address Book)
Contact us
Content Templates
Contribution
Cookie
Copyright
Credit
Custom Home and Group Home Page
Date and Time
Debugger Console
Directory of hyperlinks
Documentation link from Tiki to doc.tiki.org (Help System)
Docs
Draw
Dynamic Content
Dynamic Variable
External Authentication
FAQ
Featured links
File Gallery
Forum
Friendship Network (Community)
Gmap Google maps
Groups
Hotword
HTML Page
i18n (Multilingual, l10n)
Image Gallery
Import-Export
Install
Integrator
Interoperability
Inter-User Messages
InterTiki
Kaltura video management
Karma
Live Support
Login
Logs (system & action)
Look and Feel
Mail-in
Map with Mapserver
Menu
Meta Elements
Mobile Tiki and Voice Tiki
Module
MultiTiki
MyTiki
Newsletter
Notepad
Payment
Performance Speed / Load
Permissions
Platform independence (Linux-Apache, Windows/IIS, Mac, BSD)
Polls
Profiles
Profile Manager
Report
Toolbar
Quiz
Rating
Feeds
Score
Search engine optimization
Search
Search and Replace
Security
Semantic links
Shadowbox
Shadow Layers
Share
Shopping cart
Shoutbox
Slideshow
Smiley
Social Networks
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Stats
Surveys
Tags
Task
Tell a Friend, alert + Social Bookmarking
TikiTests
Theme CSS & Smarty
Tiki Manager
Trackers
Transitions
User Administration including registration and banning
User Files
User Menu
Watch
WebDAV
Webmail
Web Services
Wiki History, page rename, etc
Wiki Syntax
Wiki structure (book and table of content)
Workspace
WSOD
WYSIWYCA
WYSIWYG
XMLRPC

Tiki Newsletter

Delivered fresh to your email inbox!
Newsletter subscribe icon
Don't miss major announcements and other news!
Contribute to Tiki