Use esri css classes in customised popup

2626
2
Jump to solution
06-14-2016 04:35 AM
AnninaHirschi_Wyss1
Occasional Contributor III

Hello,

I'm trying to configure the popup with a "custom attribute display" for one layer in my webmap, with the same layout as the default (from jsapi-map.css), something like:

<table  class="attrTable" cellspacing="0px" cellpadding="0px">

<tbody>

<tr valign="top">

<td class="attrName"><b>Size in Hectare</b></td>

<td class="attrValue"><b>{Area_Ha}</td>

</tr>

<tr valign="top">

<td class="attrName">Area used in Ha</td>

<td class="attrValue">{AreaHaUsed}</td>

</tr>

<tr valign="top">

<td class="attrName"><b>Unique Parcel ID</b></td>

<td class="attrValue"><b>{UPI}</b></td>

</tr>

</tbody>

</table>

Now what happens: I can save that, save the map and it looks good as expected. Yet when I reload the map, all the css classes are gone. Is this the expected behaviour or is it a bug? If it's expected, is there a way to use these classes in a customised popup? See screenshots.

Thanks for any hint,

Annina

0 Kudos
1 Solution

Accepted Solutions
FC_Basson
MVP Regular Contributor

AGO might have strict styling rules like any other CMS, so that might be why it is dropping your classes.  See what happens if you do the styling inline.

View solution in original post

2 Replies
FC_Basson
MVP Regular Contributor

AGO might have strict styling rules like any other CMS, so that might be why it is dropping your classes.  See what happens if you do the styling inline.

AnninaHirschi_Wyss1
Occasional Contributor III

That's what I tried next, and it worked like that:

<td style="color: #888888; padding-right: 5px;">Size in Ha</td>

Nevertheless, the system should accept it's own classes...