8d76992254bbc8ff81f73b4b48c086144a230b9e
hiram
  Thu Aug 31 14:58:37 2017 -0700
fixing up some subtle html errors refs #18762

diff --git src/hg/lib/web.c src/hg/lib/web.c
index b857d05..18ba769 100644
--- src/hg/lib/web.c
+++ src/hg/lib/web.c
@@ -378,60 +378,63 @@
 void webNewSectionHeaderStart(boolean hasTitle)
 /* Start the header for a new section on the web page.
  * May be used to maintain table layout without a proper section header */
 {
 webEndSection();
 puts("<div>");
 puts("<!-- +++++++++++++++++++++ START NEW SECTION +++++++++++++++++++ -->");
 puts(  // TODO: Replace nested tables with CSS (difficulty is that tables are closed elsewhere)
     "<BR>\n\n"
     "   <!--outer table is for border purposes-->\n"
     "   <TABLE WIDTH='100%' BGCOLOR='#" HG_COL_BORDER
         "' BORDER='0' CELLSPACING='0' CELLPADDING='1'><TR><TD>\n"
     "    <TABLE BGCOLOR='#" HG_COL_INSIDE
          "' WIDTH='100%'  BORDER='0' CELLSPACING='0' CELLPADDING='0'><TR><TD>\n");
 if (hasTitle)
-    puts("<div class='subheadingBar' class='windowSize'>");
+    puts("<div class='subheadingBar'><div class='windowSize'>");
 else
     puts("<div>");
 }
 
-void webNewSectionHeaderEnd()
+void webNewSectionHeaderEnd(boolean hasTitle)
 /* Properly close header of collapsible section on web page */
 {
-puts("     </div>\n"
-     "     <TABLE BGCOLOR='#" HG_COL_INSIDE "' WIDTH='100%' CELLPADDING=0>"
+if (hasTitle)
+    puts("     </div></div>\n");
+else
+    puts("     </div>\n");
+puts("     <TABLE BGCOLOR='#" HG_COL_INSIDE "' WIDTH='100%' CELLPADDING=0>"
           "<TR><TH HEIGHT=10></TH></TR>\n"
      "     <TR><TD WIDTH=10>&nbsp;</TD><TD>\n\n");
 }
 
 void webNewSection(char* format, ...)
 /* create a new section on the web page */
 {
 va_list args;
 va_start(args, format);
 webNewSectionHeaderStart(TRUE);
 vprintf(format, args);
-webNewSectionHeaderEnd();
+webNewSectionHeaderEnd(TRUE);
 va_end(args);
 }
 
 void webNewEmptySection()
 /* create a new section on the web page to maintain table layout */
 {
 webNewSectionHeaderStart(FALSE);
-webNewSectionHeaderEnd();
+webNewSectionHeaderEnd(FALSE);
 }
 
 void webEndSectionTables()
 /* Finish with section tables (but don't do /BODY /HTML like
  * webEnd does. */
 {
 webEndSection();
 puts("</TD></TR></TABLE>\n");
 }
 
 void webEnd()
 /* output the footer of the HTML page */
 {
 if(!webInTextMode)
     {