Last modified: 2011-06-04 00:40:23 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T31252, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 29252 - Consecutive DIV tags insert unwanted newline
Consecutive DIV tags insert unwanted newline
Status: NEW
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
unspecified
All All
: Lowest normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: tidy
  Show dependency treegraph
 
Reported: 2011-06-02 20:34 UTC by Timwi
Modified: 2011-06-04 00:40 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Timwi 2011-06-02 20:34:04 UTC
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.
Comment 1 Bawolff (Brian Wolff) 2011-06-03 05:01:58 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links