Last modified: 2011-06-15 23:18:05 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 T31411, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 29411 - Wiki page headings should clear float
Wiki page headings should clear float
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-06-15 10:49 UTC by rabier.guillaume
Modified: 2011-06-15 23:18 UTC (History)
2 users (show)

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


Attachments

Description rabier.guillaume 2011-06-15 10:49:51 UTC
I have seen this problem on the "Absinthe" page for the section "See also", see for yourself:
http://en.wikipedia.org/wiki/Absinthe#See_also

There is an image to illustrate the section "Cultural influence". It is located on the left side of the text. But the picture's height is bigger than the text's. As a result, the next section ("See also") is right after the text of section "Cultural influence", beside the picture example.

To me, it would make more sense to be below the picture, at the same level as the other sections.

Right now, it looks like the section "See also" is a subsection of the section "Cultural influence".

This problem occurs in all browsers.

Now, I don't know if this will be considered a bug or if this is done on purpose but I submit anyway in case it's the former.
Comment 1 Bawolff (Brian Wolff) 2011-06-15 18:04:36 UTC
I'm going to call this not a bug, more the way html works (I suppose we could make headers clear:left, but that'd probably be undesired in many instances).

Basically to work around it, add
<br style="clear:left">

On the line immediately before the ==See Also== (aka at the very end of the Cultural influence section, but before See Also starts).


I'm going to close this as invalid, but please feel free to re-open if you disagree.
Comment 2 Krinkle 2011-06-15 18:17:21 UTC
Making bug summary more generic as to it's cause (rather than the result).

<br /> should only be used if a space / line-break is desired. Otherwise use <div style="clear: left;"></div> (for picture on the right, use "clear: right" and for both "clear: both".

The reason this is not going to be fixed in core is because there are many scenarios all over the place in existing wikis that expect and intend to float elements next to a heading (such as an infobox).

Alternatively headings could only float the left side, but that would break layouts with a column of (floated) thumbnails on one side, and "left" is also wrong as there are Right-to-left languages to keep in mind as well.

Not a bug. If you want to clear the left/right "picture space" simply add a "clear" element (many wikis have created a Template:Clear with <div style="clear: both;"></div> in it. Then add {{clear}} before a section to be safe.

If your wiki does not have any floated infoboxes on the left or right side and you always want to start a new "space", you can add the following to your MediaWiki:Common.css to automatically apply {{clear}} to all sections:

h1, h2, h3, h4, h5, h6 { clear: both; }
Comment 3 rabier.guillaume 2011-06-15 23:18:05 UTC
Thank you for your quick replies and your suggestions.

I used {{clear}} to fix the problem.

I didn't know there actually was a keyword for this purpose.

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


Navigation
Links