ArcGIS Hub Row CSS Class not honoured in published version

1393
2
Jump to solution
03-08-2021 03:01 AM
DataOfficer
Occasional Contributor III

I have been using the Row CSS Class option to set up custom CSS for rows in ArcGIS Hub Premium. The expected change (in this case, text size) is shown in edit mode, but when viewing the published version the text size reverts to the default.

As an example, I have a row with a single text box within it. The Row CSS Class is set to testCSS.
The html in the text box is as follows:

Test text. Should be 32 px
<style>

div.testCSS {

     font-family: lato, Arial, serif;
     font-size: 32px;

}

</style>

In edit mode, the text shows as 32 px, but reverts to the standard font size when viewing the published version. This is despite publishing the draft before viewing the published result. Am I missing something?

0 Kudos
1 Solution

Accepted Solutions
KlaraSchmitt
Esri Contributor

Should anyone else run into this issue, the solution to targeting row classes is to use a section element rather than div element as the adjacent HTML to one's class, or simply use the classname.

I was incorrect when I said the snippet looked like it should work otherwise.

View solution in original post

2 Replies
KlaraSchmitt
Esri Contributor

Hello,

Would you be able to provide a link to your site draft or published version? You can direct message me if it's not something you want to post on this forum. It sounds like you have something stepping on your CSS, but it's hard for me to diagnose without seeing the code. The snippet looks like it would work otherwise.

0 Kudos
KlaraSchmitt
Esri Contributor

Should anyone else run into this issue, the solution to targeting row classes is to use a section element rather than div element as the adjacent HTML to one's class, or simply use the classname.

I was incorrect when I said the snippet looked like it should work otherwise.