the window width expend when I add - dir="rtl"

Solved
Highlighted

Hey everyone, I started to use Edit Code service and its very fun and amazing power.

but you've got to admit sometimes its has its own world and our job is to win this game.

so I added the Hebrew language to my theme and its require to make the direction of the page,

from right to left, so-called: dir="rtl"

so this is the code I added to my Theme.

<!doctype html>
{%- if shop.locale == 'he' -%}
<html class="no-js" lang="{{ request.locale.iso_code }}" dir="rtl">
{%- else -%}
<html class="no-js" lang="{{ request.locale.iso_code }}">
{%- endif -%}

 right above the header.

and when I checked my store its apeare to expend 3 or 4 time bigger then before, the extra space is now blank.

‏‏לכידה.JPG‏‏לכידה.JPG

I would be happy for your help in finding a solution to the problem.
Thanks in advance

0 Likes
Highlighted
Astronaut
1085 178 214

This is an accepted solution.

Hello,

Without seeing your store to debug it it's difficult to help you, but try this:

1. In your theme.liquid file, find the </body> (press CTRL + F or command + F on Mac)
2. paste this code right above the </body> tag:

<style>
body,html{
overflow-x: hidden !important;
}
</style>


Let me know whether that helps you.

Kind regards,
Diego

◦ Problem Solved? ✔️ Please click on Accept as Solution and like.
◦ Hire me! Recommended by 25+ customers on Facebook. Click here to read their reviews.
◦ Contact me at: diego.boarutto.fortes@gmail.com
1 Like
Highlighted

work perfecr

0 Likes
Highlighted

actually. now after I checked on my phone it wasn't perfect...

so I found another solution that fits the phone either.

I deleted the condition of the HTML

dir="rtl"

 and in exchange added div with dir="rtl"  right after the <body> 

and of course close the div at the end (right above the </body>) 

0 Likes