Search code examples
phpmediawikimediawiki-templates

Whitespaces caused by infoboxes (table) in mediawiki article


After placing infoboxes into articles http://www.wikiskripta.eu/index.php/Inzulin and http://www.wikiskripta.eu/index.php/Hepatitida_B whitespaces with variable height occured. I am unnable to get rid of it.


Solution

  • White space caused by template use is an ugly issue. Basically you have to make sure templates never create empty lines, this can be done by making them less readily readable by either deleting the empty lines or introducing comments to span over them. Empty lines inside some nested structure like tags, tables or noincludes are not the issue, just the ones outside of them.

    As long as only one empty line is created by the (recursive) template call, it is harmless. But two empty lines are converted by mediawiki automatically into a paragraph, causing the browser to display white space at the start of the article.