Warning: This data is provided under the Google User Data Policy. Please review and comply with the policy. Failure to do so might result in project or account suspension.

Change the One Tap prompt position

Stay organized with collections Save and categorize content based on your preferences.

By default, the One Tap prompt is displayed in the top-right corner of desktop web browser windows. To display the One Tap prompt inside a container element, specify the DOM ID of the container element in the data-prompt_parent_id attribute.

The following code example reuses the g_id_onload element as the container element and displays the One Tap prompt in the specified position:

<div id="g_id_onload"
     style="position: absolute; top: 100px; right: 30px;
            width: 0; height: 0; z-index: 1001;">

The data-prompt_parent_id attribute is ignored on mobile web browsers.