Hi,
In ArcGIS Online/Portal for ArcGIS, I wish to add color on text in PopUps. As I cannot see any option for color setting
I am using 'html style' source and I tried to add <font color="rgb(0, 0, 255)"> tag as follow:
<p>
<font color="rgb(0, 0, 255)">Text in red</font>
</p>
But it is ignored when interpreted in PopUps! And the <font color="rgb(0, 0, 255)"> tag disapears.
Is it normal behaviour? How can I tweak text color in PopUps?
in PopUps
Solved! Go to Solution.
The font tag has been deprecated. Instead, colors should be defined with css, either in a stylesheet (impossible for popups) or as inline style.
When I tested right now, the MapViewer automatically converted font tags to span tags with the appropriate color, but only for color names and hexcodes, not for rgb values. But those still work when you use the correct syntax.
<p>
Using color names: <span style="color:red;">Red</span>, <span style="color:green;">Green</span>, <span style="color:blue;">Blue</span>
</p>
<p>
Using hex codes: <span style="color:#ff0000;">Red</span>, <span style="color:#00ff00;">Green</span>, <span style="color:#0000ff;">Blue</span>
</p>
<p>
Using rgb: <span style="color:rgb(255,0,0);">Red</span>, <span style="color:rgb(0,255,0);">Green</span>, <span style="color:rgb(0,0,255);">Blue</span>
</p>
The font tag has been deprecated. Instead, colors should be defined with css, either in a stylesheet (impossible for popups) or as inline style.
When I tested right now, the MapViewer automatically converted font tags to span tags with the appropriate color, but only for color names and hexcodes, not for rgb values. But those still work when you use the correct syntax.
<p>
Using color names: <span style="color:red;">Red</span>, <span style="color:green;">Green</span>, <span style="color:blue;">Blue</span>
</p>
<p>
Using hex codes: <span style="color:#ff0000;">Red</span>, <span style="color:#00ff00;">Green</span>, <span style="color:#0000ff;">Blue</span>
</p>
<p>
Using rgb: <span style="color:rgb(255,0,0);">Red</span>, <span style="color:rgb(0,255,0);">Green</span>, <span style="color:rgb(0,0,255);">Blue</span>
</p>
Great!
The color attribute is font tag is not working on its own, but as you said, it works embedded in an inline style... For me it kept the font tag as follow:
<p>
<font style="color:rgb(255,0,0);">Text in red</font>
</p>
And it works
Just a pity there is not a color shortcut button in the toolbar to apply color to text in PopUps design...