HOW TO
In Map Viewer in the ArcGIS Enterprise portal and ArcGIS Online, multiple tables with subheaders in pop-ups help maintain the original subheader distribution, ensuring correct display and readability. This approach improves consistency by preventing shifts in table width between groups and enhances structure by stacking groups within a single table without extra elements.
Complete the workflow provided to create multiple tables with subheaders in pop-ups using HTML in the ArcGIS Enterprise portal and ArcGIS Online Map Viewer.
The code block below shows the full working script for two tables in ArcGIS Online Map Viewer.
<figure class="table">
<table style="border-collapse:collapse;" width="99%">
<thead>
<tr>
<th style="background-color:#333;border-bottom:2px solid #555;color:white;padding:8px;text-align:left;" colspan="2">
<strong>Group 1 </strong>
</th>
</tr>
</thead>
<tbody>
<tr style="background-color:#f2f2f2;">
<td style="border-bottom:1.4px solid #ddd;border-right:1.4px solid #ddd;font-weight:550;padding:8px;text-align:left;">
field 1
</td>
<td style="border-bottom:1.4px solid #ddd;padding:8px;text-align:left;">
abc
</td>
</tr>
<tr>
<td style="border-bottom:1.4px solid #ddd;border-right:1.4px solid #ddd;font-weight:550;padding:8px;text-align:left;">
field 2
</td>
<td style="border-bottom:1.4px solid #ddd;padding:8px;text-align:left;">
abc
</td>
</tr>
<tr style="background-color:#f2f2f2;">
<td style="border-bottom:1.4px solid #ddd;border-right:1.4px solid #ddd;font-weight:550;padding:8px;text-align:left;">
field 3
</td>
<td style="border-bottom:1.4px solid #ddd;padding:8px;text-align:left;">
abc
</td>
</tr>
</tbody>
</table>
</figure>
<figure class="table">
<table style="border-collapse:collapse;" width="99%">
<thead>
<tr>
<th style="background-color:#333;border-bottom:2px solid #555;color:white;padding:8px;text-align:left;" colspan="2">
<strong>Group 2 </strong>
</th>
</tr>
</thead>
<tbody>
<tr style="background-color:#f2f2f2;">
<td style="border-bottom:1.4px solid #ddd;border-right:1.4px solid #ddd;font-weight:550;padding:8px;text-align:left;">
field 1
</td>
<td style="border-bottom:1.4px solid #ddd;padding:8px;text-align:left;">
abc
</td>
</tr>
<tr>
<td style="border-bottom:1.4px solid #ddd;border-right:1.4px solid #ddd;font-weight:550;padding:8px;text-align:left;">
field 2
</td>
<td style="border-bottom:1.4px solid #ddd;padding:8px;text-align:left;">
abc
</td>
</tr>
<tr style="background-color:#f2f2f2;">
<td style="border-bottom:1.4px solid #ddd;border-right:1.4px solid #ddd;font-weight:550;padding:8px;text-align:left;">
field 3
</td>
<td style="border-bottom:1.4px solid #ddd;padding:8px;text-align:left;">
abc
</td>
</tr>
</tbody>
</table>
</figure>
The image below shows two tables, each with a subheader, in a pop-up created using HTML in the ArcGIS Enterprise portal and ArcGIS Online Map Viewer.
Article ID: 000035224
Get help from ArcGIS experts
Download the Esri Support App