title: Add colspan to last cell of dynamic table row if row has fewer columns
body: <p>Maybe this has been asked before, but my many google searches aren't pulling up my need...</p>
  
  <p>I have a table that is created dynamically. In it contains rows that have 4 columns and rows that have 3 columns. What I want to do is align the last cell of rows with 3 columns to the far right of the table. I think the best way is to add a colspan="2"  to the last column of a 3 column row. </p>
  
  <p>So my question is, how can I get the greatest number of columns in a table, and add a colspan to the last cell of a row that contains fewer columns to fill up that balance?</p>