Shopify themes, liquid, logos, and UX
hello everyone,
i would like your assistance moving all the text inside my input text boxes from left to right :
to right to left.
link to website :
Solved! Go to the solution
This is an accepted solution.
Hey @ChicBotique1,
Go to your theme's "Edit Code" Option, then in the search bar type "theme.liquid"
Below the tag "<head>" tag paste the following. Screenshot attached for reference.
<style>
label.field__label {
left: auto !important;
right: 15px !important;
}
</style>
Screenshot is for reference only, the correct code to paste is the one shown above.
This is an accepted solution.
Hello @ChicBotique1
Welcome to Shopify Community,
Please use below CSS:
.field__input, .select__select, .customer .field input, .customer select {
text-align: right !important;
}
.field__label, .customer .field label {
left: auto !important;
right: calc(var(--inputs-border-width) + 2rem);
}
.field__input:focus~.field__label, .field__input:not(:placeholder-shown)~.field__label, .field__input:-webkit-autofill~.field__label, .customer .field input:focus~label, .customer .field input:not(:placeholder-shown)~label, .customer .field input:-webkit-autofill~label {
right: calc(var(--inputs-border-width) + 2rem);
left: auto !important;
}
OUTPUT:
Thanks
This is an accepted solution.
Hey @ChicBotique1,
Go to your theme's "Edit Code" Option, then in the search bar type "theme.liquid"
Below the tag "<head>" tag paste the following. Screenshot attached for reference.
<style>
label.field__label {
left: auto !important;
right: 15px !important;
}
</style>
Screenshot is for reference only, the correct code to paste is the one shown above.
@ThePrimeWeb thank you very much brother,
you have any idea what it doesn't apply on the checkout page?
Hey @ChicBotique1,
Because CSS is not allowed on checkout page. Unfortunately there's nothing you can do about that. Only Shopify Plus customers can change that.
What would be the proper solution for Multi Language store? For example, English LTR and Arabic RTL?
This is an accepted solution.
Hello @ChicBotique1
Welcome to Shopify Community,
Please use below CSS:
.field__input, .select__select, .customer .field input, .customer select {
text-align: right !important;
}
.field__label, .customer .field label {
left: auto !important;
right: calc(var(--inputs-border-width) + 2rem);
}
.field__input:focus~.field__label, .field__input:not(:placeholder-shown)~.field__label, .field__input:-webkit-autofill~.field__label, .customer .field input:focus~label, .customer .field input:not(:placeholder-shown)~label, .customer .field input:-webkit-autofill~label {
right: calc(var(--inputs-border-width) + 2rem);
left: auto !important;
}
OUTPUT:
Thanks
@Sweet_Savior_3 thank you, your solution affected all text boxes
the other code only affected my form. etc.
Both solutions work
can you tell me what is a better way to implement the solution?
CSS ? or HTML ?
HTML doesn't control positioning, CSS is the only option. There is no better way because CSS is the only way.
@ThePrimeWeb i have your code in liquid.theme
and @Sweet_Savior_3 on the bottom of base.css
not sure witch solution is more professional..
What do you mean by professional? It's all upto preference. It's the same thing as driving a red car or a blue car. Nothing is more professional than the other, it's just your preference.
If you want my code in base.css then remove the style tags and paste it there.
Hello
You can remove one code and check if everything if fine and do the same with the second code.
Whichever you find relevant you can use it.
Thanks
By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024