<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial, helvetica, sans-serif;font-size:12pt"><DIV></DIV>
<DIV>I have never been able to control a table in HTML. It always has to be in the CSS.<BR> </DIV>
<P><FONT face="bookman old style, new york, times, serif" color=#ff007f size=4><EM><STRONG>Nancy</STRONG></EM></FONT></P>
<P> </P>
<P><FONT face="arial, helvetica, sans-serif">Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.</FONT></P>
<DIV><BR></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: arial, helvetica, sans-serif"><BR>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"><FONT face=Tahoma size=2>
<HR SIZE=1>
<B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> Blake Senftner <bsenftner@earthlink.net><BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> development@drupal.org<BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> Thu, October 28, 2010 9:14:04 PM<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> [development] some secret to using theme('table'...) ?<BR></FONT><BR>Hmmm... I have the following logic in a module's hook_view() creating a table out of programmatically generated information:
<DIV><BR></DIV>
<DIV>
<DIV><FONT class=Apple-style-span face=Courier size=3><SPAN class=Apple-style-span style="FONT-SIZE: 12px"> $header = array(t($node->title), t('Values:'));</SPAN></FONT></DIV>
<DIV><FONT class=Apple-style-span face=Courier size=3><SPAN class=Apple-style-span style="FONT-SIZE: 12px"> $rows = array(array('<strong>Project status:</strong>', $statusMarkup), </SPAN></FONT></DIV>
<DIV><FONT class=Apple-style-span face=Courier size=3><SPAN class=Apple-style-span style="FONT-SIZE: 12px"> array('<strong>Notes:</strong>', $node->content['body']['#value']),</SPAN></FONT></DIV>
<DIV><FONT class=Apple-style-span face=Courier size=3><SPAN class=Apple-style-span style="FONT-SIZE: 12px"> array('<strong>Images:</strong>', $imagesMarkup),</SPAN></FONT></DIV>
<DIV><FONT class=Apple-style-span face=Courier size=3><SPAN class=Apple-style-span style="FONT-SIZE: 12px"> array('<strong>Image Tags:</strong>', $imageTagMarkup),</SPAN></FONT></DIV>
<DIV><FONT class=Apple-style-span face=Courier size=3><SPAN class=Apple-style-span style="FONT-SIZE: 12px"> array('<strong>Reconstructions:</strong>',$reconsMarkup),</SPAN></FONT></DIV>
<DIV><FONT class=Apple-style-span face=Courier size=3><SPAN class=Apple-style-span style="FONT-SIZE: 12px"> array('<strong>Actions:</strong>', $actionsMarkup));</SPAN></FONT></DIV>
<DIV><FONT class=Apple-style-span face=Courier size=3><SPAN class=Apple-style-span style="FONT-SIZE: 12px"> $table = theme('table', $header, $rows, array('style' => 'width: 770px', 'class' => 'form-item'));</SPAN></FONT></DIV>
<DIV><FONT class=Apple-style-span face=Courier size=3><SPAN class=Apple-style-span style="FONT-SIZE: 12px"> $node->content['body']['#value'] = $table;</SPAN></FONT></DIV>
<DIV><BR class=webkit-block-placeholder></DIV>
<DIV><SPAN class=Apple-style-span style="FONT-FAMILY: Helvetica">
<DIV style="WORD-WRAP: break-word"><SPAN class=Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate; orphans: 2; widows: 2"><SPAN class=Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate; orphans: 2; widows: 2">
<DIV>Notice that portion where I declare the width of the table to only be 770px? That is being ignored... I've tried variations like:</DIV>
<DIV><BR></DIV>
<DIV>array( 'width' => '770px', ...) [note not 'style' here] and array( 'style' => 'width: 77px;', ...) [note added semicolon here]</DIV>
<DIV><BR></DIV>
<DIV>When I don't use the 'style' attribute, the sticky-header gets a style setting with the width set to '877.617px;', so it looks like the 'style' usage is what I need, but I'm not finding the magic combination...</DIV>
<DIV><BR></DIV>
<DIV>any advice? </DIV>
<DIV><BR class=Apple-interchange-newline>Sincerely,</DIV>
<DIV>-Blake</DIV>
<DIV><BR></DIV></SPAN></SPAN></DIV></SPAN></DIV></DIV></DIV></DIV></div></body></html>