Help:Columns

From WikiMD's Wellness Encyclopedia

edit 

Edit WikiMD




Help:Columns is a guide on how to effectively use and manage columns in MediaWiki articles. Columns are used to organize and present content in a structured manner, which can enhance the readability and aesthetic appeal of a page. This article provides instructions on creating and customizing columns using various methods supported by MediaWiki.

Usage

Columns in MediaWiki can be created using different techniques, each suitable for specific types of content and user preferences.

CSS Columns

The most common method to create columns in MediaWiki is through CSS. This approach is flexible and allows for responsive design that adapts to different screen sizes.

Example:

<div style="column-count: 2; column-gap: 20px;">
* Item 1
* Item 2
* Item 3
* Item 4
</div>

This code will split the content into two columns with a gap of 20 pixels between them.

Templates

Another method to create columns is by using templates specifically designed for this purpose. Templates such as {{ Columns-list}}

and {{

Div col}}

can be used to automatically divide content into columns.

Example using {{ Div col}}

{{Div col|cols=3}}
* Item 1
* Item 2
* Item 3
* Item 4
{{Div col end}}

This will create a three-column layout for the list items.

Customization

Customization of columns can be done by adjusting the CSS properties. Users can modify the number of columns, the gap between columns, and the rule (or line) that appears between them.

CSS Properties:

  • column-count - defines the number of columns.
  • column-gap - sets the gap between columns.
  • column-rule - adds a line between columns.

Considerations

When using columns, it is important to consider the readability and accessibility of the content. Columns should be used judiciously to enhance the layout without compromising the user experience.

See also


Contributors: Prab R. Tumpati, MD