HOW TO

Vertically align text to the middle of an image in Portal for ArcGIS and ArcGIS Online Map Viewer pop-ups

Last Published: June 13, 2023

Summary

In Portal for ArcGIS and ArcGIS Online Map Viewer, the text alignment options available are 'Align left', 'Align right', 'Align center', and 'Justify'. These options change the placement of the text within a text box horizontally.

The text, PlaceholderText being applied the different alignment options in the text editor in Map Viewer.

However, there is no option to vertically align the text to the middle of an image in the pop-ups as shown in the image below.

The text, PlaceholderText is vertically aligned at the middle of the pink square.

As a workaround, HTML formatting can be used to insert a table to achieve the desired result. In this article, the original text used to demonstrate the workflow is aligned at the bottom of the image.

The text, PlaceholderText is aligned at the bottom of the pink square image in a pop-up in Map Viewer.

Procedure

  1. Log in to Portal for ArcGIS or ArcGIS Online and open the web map in Map Viewer.
  2. In Map Viewer, on the Settings (light) toolbar, click Configure pop-ups The Configure pop-ups button. in Portal for ArcGIS, or Pop-ups in ArcGIS Online.
  3. In the Pop-ups pane, click Add content, and select Text.
  4. In the text editor, click Source The Source button in the text editor..
  5. Configure the HTML codes. Replace <link_to_image> with the URL of the image.
<figure class="table">
    <table style="border-collapse:collapse;" border="0">
        <tbody>
            <tr>
                <td style="width:30%;">
                    <img class="image_resized" style="width:100%;" src="<link_to_image>" alt="" width="100" height="100">
                </td>
                <td style="width:70%;">
                    insert value for cell here
                </td>
            </tr>
        </tbody>
    </table>
</figure>
  1. Click Source. The table is displayed in the text editor.
  2. Click OK to close the text editor.
  3. On the Contents (dark) toolbar, click Save and open, and click Save to save the modifications.

The text is vertically aligned to the middle of the image in the pop-up.

The text, PlaceholderText is vertically aligned at the middle of the pink square image in a pop-up in Map Viewer.

Article ID: 000030467

Software:
  • ArcGIS Online
  • Portal for ArcGIS
  • ArcGIS Enterprise 10 x
  • ArcGIS Enterprise 11 0
  • ArcGIS Enterprise 11 1

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options