Pergi ke kandungan

Templat:Blok tengah/doc

Daripada Wikipedia, ensiklopedia bebas.

This template places a block of text in the center of the page, without affecting the text alignment within that block.

Kegunaan

[sunting sumber]

Parameter

[sunting sumber]

Where there is a requirement to fix the width or height of the block, optional "width" and "height" parameters can be used. If additional style adjustments are required, use the optional "style" parameter.

Contoh 1

[sunting sumber]
{{center block|width=300px|height=200px|Lorem ipsum dolor sit amet, consectetuer adipiscing elit.<br>
Aenean commodo ligula eget dolor.

Aenean massa.}}

Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Aenean commodo ligula eget dolor.

Aenean massa.

Contoh 2

[sunting sumber]
  • For exactly the same "spacing" as rendered by normal paragraph(s) before &/or after the template-inserted content.
<p>By clicking the “Save page” button, you are agreeing to the Terms of Use, the Privacy Policy, and you irrevocably agree to release your contribution under the CC-BY-SA 3.0 License and the GFDL. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.</p>

{{center block|width=300px|Lorem ipsum dolor sit amet, consectetuer adipiscing elit.<br>
Aenean commodo ligula eget dolor.

Aenean massa.}}

<p>Text is available under the Creative Commons Attribution-Share Alike License; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy.</p>

By clicking the “Save page” button, you are agreeing to the Terms of Use, the Privacy Policy, and you irrevocably agree to release your contribution under the CC-BY-SA 3.0 License and the GFDL. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.

Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Aenean commodo ligula eget dolor.

Aenean massa.

Text is available under the Creative Commons Attribution-Share Alike License; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy.

Contoh 3

[sunting sumber]
  • For slightly larger "spacing" between normal paragraph(s) before &/or after the template-inserted content.
<p>By clicking the “Save page” button, you are agreeing to the Terms of Use, the Privacy Policy, and you irrevocably agree to release your contribution under the CC-BY-SA 3.0 License and the GFDL. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.</p>

{{center block|style=max-width:300px|Lorem ipsum dolor sit amet, consectetuer adipiscing elit.<br>
Aenean commodo ligula eget dolor.

Aenean massa.}}

<p>Text is available under the Creative Commons Attribution-Share Alike License; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy.</p>

By clicking the “Save page” button, you are agreeing to the Terms of Use, the Privacy Policy, and you irrevocably agree to release your contribution under the CC-BY-SA 3.0 License and the GFDL. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.

Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Aenean commodo ligula eget dolor.

Aenean massa.

Text is available under the Creative Commons Attribution-Share Alike License; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy.

Data Templat

[sunting sumber]
Ini ialah TemplateData untuk templat ini yang digunakan oleh TemplateWizard, VisualEditor dan alatan-alatan lain. Lihat laporan penggunaan parameter bulanan untuk Template:Blok tengah.

TemplateData untuk Blok tengah

A template to center-align block with content in any other places, without affecting the text alignment within that block. This may harm some templates.

Parameter templat

ParameterKeteranganJenisStatus
Content1

tiada keterangan

Kandungandiperlukan
Width of block areawidth

tiada keterangan

Tidak diketahuipilihan
Height of block areaheight

tiada keterangan

Tidak diketahuipilihan
Titletitle

tiada keterangan

Tidak diketahuipilihan
Custom CSSstyle

tiada keterangan

Tidak diketahuipilihan

Lihat juga

[sunting sumber]