Last modified: 2013-03-09 10:19:04 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 13766 - one cell <table> in TOC is ugly HTML
one cell <table> in TOC is ugly HTML
Status: RESOLVED DUPLICATE of bug 658
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.13.x
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
http://en.wikipedia.org/wiki/Record_c...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-16 15:42 UTC by Dan Jacobson
Modified: 2013-03-09 10:19 UTC (History)
5 users (show)

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


Attachments

Description Dan Jacobson 2008-04-16 15:42:10 UTC
Say, what is  this <table> doing here at the table of contents?

<table id="toc" class="toc" summary="Contents">
<tr>
<td>
...
</td>
</tr>
</table>

Is this one cell table some remnant of back in the early days of the
web when people used tables for page layout?

Isn't there a better way to accomplish whatever it is your are trying to do?
Comment 1 Brion Vibber 2008-04-16 19:09:56 UTC
A table is used to let the box automatically size correctly, which a <div> doesn't do.

An appropriate CSS incantation that works reliably across browsers may or may not exist, in which case we'd be happy to switch it.
Comment 2 The Evil IP address 2010-07-21 20:21:02 UTC
For all browsers besides IE < 8, the "display:table" could be used. 

<div class="toc" id="toc">
the toc
</div>

div#toc { display:table; }

For IE, the following might work within conditional comments:

div#toc { float: left; /* or right in rtl */ }
div#toc + * { clear:left; /* right in rtl */ }

Worked in Firefox, but I can't test it in IE, as this isn't installed on my PC, however, I wouldn't be surprised if there was something IE doesn't support.
Comment 3 DieBuche 2010-12-21 18:33:55 UTC
display:inline-block is the easiest.
Supported in IE6 as well if we make the div hasLayout by setting zoom:1 afterwords.
Comment 4 Krinkle 2010-12-21 18:48:13 UTC
I'm not sure why would want to switch from:
* a semantically correct use of tables that works without hacks in all browser we support
to:
* a semantically meaningless div with a css-rule to make it behave like a table which requires a IE6-hack as well to make it work in IE6.

TOC stands for Table of Contents...
Comment 5 Krinkle 2010-12-21 18:51:09 UTC
Hm.. on second thought, it's not really being used as a table from what I can see.
It's an unordered list actually with a <div> for the title.

So, switching from one 'hack' to another, may not be that bad if it saved a bit of markup :-)
Comment 6 DieBuche 2011-07-27 13:24:40 UTC
Done in r93264
Comment 7 Brion Vibber 2011-07-28 22:01:26 UTC
Reverted in r93436 -- please see code review comments on r93264.
Comment 8 Bartosz Dziewoński 2013-03-09 10:19:04 UTC

*** This bug has been marked as a duplicate of bug 658 ***

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


Navigation
Links