Admin Forum:Need help converting data table to HTML 5

Please see:
 * http://cannabis.wikia.com/wiki/User:Timeshifter/Sandbox_19

See the middle table. I need an HTML-5 way to add cell padding to all the cells but without adding it individually to each cell. I also need narrower borders. See the bottom cell to see what I am looking for.

I want to be able to paste the finished table into email, and so I don't want the table dependent on external CSS style sheets.

It seems also that style="text-align:left;" in the division works on all cells in Firefox, but not in Internet Explorer. --Timeshifter 20:02, July 10, 2012 (UTC)


 * I'm looking into it for you now. – Jazzi  ( talk ) 20:10, July 10, 2012 (UTC)


 * Done. Copy the following onto the page:

– Jazzi  ( talk ) 20:13, July 10, 2012 (UTC)


 * To answer your note about Internet Explorer, if you apply text-align to the table, IE does not apply that to every cell. You have to apply it to every cell yourself because IE is a bit retarded >_>. You could do that by giving your table a class, say class="my-table" and then putting this in your MediaWiki:Common.css:


 * Your above table is not HTML-5 compliant. "bgcolor" and "align" for example. Thanks for trying though. I am not sure it is possible to do what I want to do.


 * I think the designers of HTML 5 and browsers are clueless to real world needs in many cases. Especially for pasting stuff into email where one can't take an external stylesheet. And especially for making tables simpler. It should be possible to set the text alignment of all header cells in a division, or all data cells. But I am getting the feeling that it is not possible. See:
 * http://www.webdeveloper.com/forum/showthread.php?t=262443


 * I guess I will have add some HTML-4 stuff as backup:
 * border=1 cellspacing=0 cellpadding=3


 * It solves the problem. I hope it is left in the wikitext after the latest Mediawiki version is installed on my wiki. That way the table will still look right when pasted in email.


 * Maybe by HTML 6 the designers of it will get a clue. --Timeshifter 20:53, July 10, 2012 (UTC)
 * Wiki needs != real world needs.--PedroM 21:11, July 10, 2012 (UTC)


 * Why paste stuff into emails? That's what attachments are for. Pasting stuff into emails is laziness.


 * Fools open attachments. :) --Timeshifter 21:36, July 10, 2012 (UTC)