Page MenuHomePhabricator

Consecutive DIV tags insert unwanted newline
Closed, ResolvedPublic

Description

Author: bugzilla.wikimedia.org

Description:
I tried to create a multicolored horizontal bar by using 'display: inline-block' on several consecutive DIV elements, for example:

<div style='background: red; width: 80px; height: 0.7em; display: inline-block;'></div><div style='background: green; width: 160px; height: 0.7em; display: inline-block;'></div>

Unfortunately MediaWiki renders this into HTML by adding a newline between the two tags, which the browser of course renders as a space, and thus the two bars have a gap between them.

The same happens for other block-level elements, for example HR.

Expected behaviour is to have no such newline between the tags.


Version: unspecified
Severity: normal

Details

Reference
bz29252

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 11:38 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz29252.
bzimport added a subscriber: Unknown Object (MLST).

MediaWiki is fine, Tidy is screwing things up. (Unfortunatly that means its unlikely to be fixed in the near future). In the mean time you'll have to use some other method, probably could be done using relative/absolute positioning.

Izno subscribed.

This is fixed by Remex.