Minimal theme - full width Custom HTML section

AI-generated summary

Custom HTML セクション内の画像を、デスクトップ/モバイル両方でフル幅(画面いっぱい)にしたいという相談。

  • 提案内容: テーマの「Edit code」→ Assets の theme.scss.liquid 末尾に、対象セクションID(#shopify-section-163712508506f9f402)へ CSS(width: 100vw、left: -20vw 等)を追加して全幅化する方法が提示された。
  • 一度は希望の見た目になることを確認。

最新状況:

  • 追加したCSSで「ほぼ」できたが、画像が完全に端まで伸びず、中央からずれて表示される問題が発生(スクリーンショットあり)。
  • 提案者は「バックエンドコードとカスタマイズで修正可能」と返答したが、具体的な修正コードや手順は提示されておらず、結論は未解決のまま。

Hi there,

I have a custom HTML section on my homepage with an image. I’d like to make the image full width on desktop and mobile. Can someone help me figure out what code is needed to do this?

Website: annieryan.net

PW: pot

Screenshot below - I’d like to make the blue image full width.

Thanks in advance!

Annie

@anniemittry

yes please confirm this look!

@KetanKumar Yes, that’s perfect!!

@anniemittry

thanks for confirm yes please add this code

  1. Go to Online Store->Theme->Edit code
  2. Asset->/theme.scss.liquid->paste below code at the bottom of the file.
#shopify-section-163712508506f9f402 {
    position: relative;
    width: 100vw;
    left: -20vw;
}

Hi @KetanKumar - thank you, that almost worked, but the image doesn’t fully extend and is off center. Any fixes?

@anniemittry

its bigger screenshot doesn’t work code it can be done change backcode

I’m not sure I understand. Should I change the code? Or is there no fix?

@anniemittry

yes, its fix to backend code and customization