How to center text on the account log in page?

Topic summary

A user is trying to center the “forgot password” link on their Shopify store’s account login page. Despite adding the text-center class to the containing div, the text remains left-aligned.

Current Issue:

  • The code includes <div class="text-center"> wrapping the forgot password link
  • The centering isn’t working as expected

Proposed Solution:

  • Another user suggested using inline HTML styling: <div style="text-align: center;">
  • This approach worked successfully on their contact page

Next Steps:

  • The original poster shared their store URL (https://www.es-sabers.co.uk/account/login) for others to review
  • They plan to try the inline CSS suggestion
  • A third user requested the store URL and password to investigate further

The discussion remains open as the user tests the suggested fix.

Summarized with AI on November 18. AI used: claude-sonnet-4-5-20250929.

Hi,

I am having an issue centering the text shown on the account log in page for the forgot password link.

I have checked the coding but am I missing something

{{ 'customer.recover_password.success' | t }}

{{ 'customer.login.title' | t }}

{% form ‘customer_login’, novalidate: ‘novalidate’ %}
{%- if form.errors -%}

{{ 'contact.form.error_heading' | t }}

{{ form.errors | default_errors }}
{%- endif -%}

{{ ‘customer.login.email’ | t }}
<input
type=“email”
name=“customer[email]”
id=“CustomerEmail”
autocomplete=“email”
autocorrect=“off”
autocapitalize=“off”
{%- if form.errors contains ‘form’ -%}
class=“input–error”
aria-invalid=“true”
{%- endif -%}

{% if form.password_needed %}
{{ ‘customer.login.password’ | t }}
<input
type=“password”
value=“”
name=“customer[password]”
id=“CustomerPassword”
{%- if form.errors contains ‘form’ -%}
class=“input–error”
aria-invalid=“true”
{%- endif -%}

{% endif %}

{% if form.password_needed %}

{{ 'customer.login.forgot_password' | t }}

{% endif %}

{{ 'layout.customer.create_account' | t | customer_register_link }}

{% endform %}

{{ 'customer.recover_password.title' | t }}

{{ 'customer.recover_password.subtext' | t }}

{% form 'recover_customer_password' %} {% comment %} Add a hidden span to indicate the form was submitted succesfully. {% endcomment %} {% if form.posted_successfully? %} {% endif %}

{{ ‘customer.recover_password.email’ | t }}
<input
type=“email”
value=“”
name=“email”
id=“RecoverEmail”
class=“input-full{% if form.errors %} input–error{% endif %}”
autocorrect=“off”
autocapitalize=“off”
{% if form.errors %}
aria-invalid=“true”
aria-describedby=“RecoverEmail-email-error”
{%- endif -%}

{%- if form.errors -%}

{{ ‘general.accessibility.error’ | t }}
{% include ‘icon-error’ %}
{{ form.errors.messages.form }}

{%- endif -%}

{% endform %}

{% comment %}
If accounts are set as optional, the following will be shown as an option
during checkout, not on the default /login page.
{% endcomment %}
{% if shop.checkout.guest_login %}


{{ 'customer.login.guest_title' | t }}

{% form ‘guest_login’ %}

{% endform %}

{% endif %}

Any help would be appreciated. Thanks,

James

I’m NOT a techie.

But this is what I used on our contact page to center our text.

It’s only HTML. Nothing fancy. But it works.

If twer me.. I’d wrap this code around the statement you are trying to center.

Forgot your password?

Note: I edited the post to make it simpler.

Hey @ES_Sabers
Kindly share your Store URL and Password if enabled

You can find it here on our store https://www.es-sabers.co.uk/account/login

Thanks!

Thanks for taking a look.

I think it is this section, just unsure why it hasn’t centred it has “text-center” but I will try the HTML you suggested. Appreciate it!

{% if form.password_needed %}

{{ 'customer.login.forgot_password' | t }}

{% endif %}

{{ 'layout.customer.create_account' | t | customer_register_link }}