Template:Infobox: Difference between revisions

From Foxwells Wiki
Jump to navigation Jump to search
death
m float
Line 22: Line 22:
* `clear`: CSS `clear` property (e.g., `right`, `left`)
* `clear`: CSS `clear` property (e.g., `right`, `left`)
</noinclude><includeonly><templatestyles src="Infobox/styles.css"/>
</noinclude><includeonly><templatestyles src="Infobox/styles.css"/>
<div class="ec-infobox" style="border-color: {{{border-colour|#aaa}}}; clear: {{{clear|right}}}">
<div class="ec-infobox" style="border-color: {{{border-colour|#aaa}}}; float: {{{float|right}}}; clear: both;">
   <div class="ec-infobox-title" style="background-color: {{{background-colour|#ccc}}}; color: {{{text-colour|#000}}}">
   <div class="ec-infobox-title" style="background-color: {{{background-colour|#ccc}}}; color: {{{text-colour|#000}}}">
     {{{title}}}
     {{{title}}}

Revision as of 09:15, 10 July 2025

   Example Infobox
    An example image
Caption goes here

The content of an Infobox is just regular WikiText!

This template creates a styled infobox with customizable colors and flexible content.

Parameters

  • `title`: Title of the infobox
  • `image`: (Optional) Filename of an image (must be uploaded)
  • `image_alt`: Image alt text
  • `image_caption`: (Optional) Text shown below the image
  • `content`: The main content (use paragraphs, images, etc.)
  • `width`: CSS width (e.g., `300px`)
  • `aspect-ratio`: (Optional) CSS aspect-ratio for content box
  • `border-colour`: Border color of the box
  • `background-colour`: Background color of the title
  • `text-colour`: Text color of the title
  • `clear`: CSS `clear` property (e.g., `right`, `left`)