Last modified: 2006-08-17 22:18:38 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 691 - white border around floating image
white border around floating image
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
All All
: Low trivial with 2 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  Show dependency treegraph
Reported: 2004-10-11 21:38 UTC by Marc Mongenet
Modified: 2006-08-17 22:18 UTC (History)
2 users (show)

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


Description Marc Mongenet 2004-10-11 21:38:10 UTC
This code:

[[Image:Sudan flag medium.png|right|100px|Soudan]]

causes a big white border around the picture. When the background is not white,
this can be slightly ugly. It is the case on the French Wikipédia home page
where it uses a light blue paragraph background.
Comment 1 Goplat 2004-10-12 01:52:39 UTC
There are many things that have an explicit white border or background 
in main.css that will clash with a darker main background:
table, legend, div.floatright, table.floatright, div.floatleft, 
table.floatleft, div.thumb, div.townBox, #pagehistory li, table.diff, 
td.diff-otitle, td.diff-ntitle, #preftoc li

For some of these the borders could be replaced with padding/margin 
and the backgrounds removed, but others need it to stop the border of 
<h2> and <hr> from overlapping them when floating.
Comment 2 Peter Gervai (grin) 2004-11-23 20:22:49 UTC
We implemented in MediaWiki:Monobook.css on hu:

div.floatright, table.floatright {
    clear: right;
    float: right; 
    margin: 0.5em 0 0.8em 1.4em;
    position: relative;
    border-width: 0;
div.floatleft, table.floatleft {
    float: left; 
    margin: 0.3em 0.5em 0.5em 0;
    position: relative;
    border-width: 0;

What is pretty interesting that if I leave out border-width then the bug is present (probably I would find it if I 
would have time to browse through the whole main.css), so somewhere someone defines a white border for the floats. 

Anyway, white borders should be avoided, as Goplat so rightly mentioned, and replaced by margin or padding. White 
border makes look transparent pictures stupid on non-white backgrounds. Someone can use DIV style="background:
white" if a HR needs to be surpassed...
Comment 3 Brion Vibber 2004-11-24 00:21:16 UTC
The CSS definitions for (div|table).float(left|right) add a white border. I 
believe it's a workaround for some browser bug, but unfortunately I don't 
know which browser (possibly IE/Mac, possibly not), and it's not 

If there's a better workaround, or if it can be enabled only for the freak 
browser, that would be good.
Comment 4 Peter Gervai (grin) 2005-01-21 13:37:53 UTC
Well could anyone figure out who did that white border change in the
monobook.css? Or if anyone see a border or other problem on:

(the current seal-of-alaska is a transparent png, if the page would change then
create a testpage with [[Image:Alaska-state-seal.png]]...)

since as I mentioned we removed the white borders (obviously, as the mentioned
png would suffer severe border-illness).
Comment 5 Vague Rant 2005-03-13 08:48:36 UTC
Couldn't the background-color for these elements be set to
"transparent"? The margins would still be there, you just
wouldn't see them.
Comment 6 Edward Z. Yang 2006-01-09 02:03:47 UTC
This can sorta be fixed by changing the MediaWiki's installation's
[[MediaWiki:Monobook.css]] to have a definition like:

 .thumb {border-color:whatever-your-background-color-is;}

This is a problem on Meta, and I've motioned for a change... but I need a Sysop
to do that.
Comment 7 lɛʁi לערי ריינהארט 2006-01-16 20:57:41 UTC

Is his bug fixed?

The url is outdated; the page with timestamp "11 octobre 2004 à 19:41"
includes actual versions of the used templates and an old screen shot is not

See some (non relevant ?) tests at [[fr:Utilisateur:Gangleri/tests/bugzilla/00691]].

(In reply to comment #6)
Edward please provide a new url from Meta. Thanks in advance!

best reagrds reinhardt [[user:gangleri]]
Comment 8 Aryeh Gregor (not reading bugmail, please e-mail directly) 2006-08-17 22:18:38 UTC
Fixed almost two years ago in r6095.

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