> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aftersell.com/llms.txt
> Use this file to discover all available pages before exploring further.

# モバイルでカートが左右にスクロールできてしまう

> この記事では、Upcartのコンテンツが左右に動いてしまうバグを修正する方法を説明します。

<div id="overview">
  # 概要
</div>

特定のモバイルデバイスでは、ユーザーがUpcartを水平方向にスクロールでき、右側に意図しない余白が表示されてしまうことがあります。これは通常、カート内の子要素がビューポートの幅を超えたり、レイアウトの自然な制約を乱したりして、水平方向のオーバーフローが発生する場合に起こります。

<img src="https://mintcdn.com/aftersell/uxKAdY-e0h16xa48/images/upcart/mobile-scrolling-cart-drawer-sideways-reveal.gif?s=a56e1b9142181c3b06f1a7fed5e07c72" alt="モバイルのUpcartカートドロワーが横方向にスクロールし、右側に不要な余白が表示される様子" width="400" data-path="images/upcart/mobile-scrolling-cart-drawer-sideways-reveal.gif" />

***

<div id="css-solution">
  ## **CSSによる解決策**
</div>

この動作を防ぎ、カートをビューポート幅内に収めるには、以下のコードをコピーして次の場所に追加するだけです。

Cart Editorで **Settings** を開き、**Custom CSS** タブを選択します。Settingsはタブの列になっています。Custom CSSが表示されない場合は、**More settings** の中にあります。

```
.upcart-cart-body  
{  
	overflow-x: hidden !important;  
}
```
