Summary: How to change the default attributes for tables created using PmWiki.Tables
Version: 2004-11-30
Maintainer: Pm
Categories: Markup, Editing


How can I change the default attributes for tables created using PmWiki.Tables?


In a local configuration file, set $BlockMarkups['table'][0] to the value that you would like to be used for a table's opening <table> tag. Examples:

    $BlockMarkups['table'][0] = "<table width='100%'>";
    $BlockMarkups['table'][0] = "<table border='1'>";
    $BlockMarkups['table'][0] = 
      "<table width='100%' class='simpletable'>";

(Using width='100%' in an Internet Explorer environment can cause problems if the surrounding text block has margins. What seems to happen is IE treats the 100% as 100% of the browser width. If the left margin is, say, 20px, the table then protrudes 20px into the right margin. Other browsers don't behave this way.)

Oh yes, that's correct. I had forgotten about this misfeature of Internet Explorer. We should come up with a better default. --Pm

See Also


  • Pm, 2004-11-30


See discussion at DefaultTableAttributes-Talk

User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.