# ログイン画面の「アカウントを作成する」ボタンを非表示にしたい

**URL:** <https://community.shopify.com/t/topic/368746>\
**Category:** 技術的なQ＆A\
**Tags:** css, html\
**Created:** [October 24, 2024, 5:21am UTC](https://community.shopify.com/t/topic/368746 "2024-10-24T05:21:32Z")\
**Posts on this page:** 5\
**Page:** 1

## AI-generated summary

BtoBサイトのログイン画面で「アカウントを作成する」ボタンを非表示にする方法についての質問。

**質問者の課題:**
- カスタムCSSでボタンを非表示にしたいが、要素名が不明
- 該当する要素のクラスやIDを特定できない

**提案された解決策:**

1. **シンプルな方法** - クラス名を直接指定:
```css
.__web-inspector-hide-shortcut__ {
  display: none;
}
```

2. **より安全な方法** - 属性セレクタを使用:
```css
a[href="/account/register"].__web-inspector-hide-shortcut__ {
  display: none;
}
```

**結果:**
質問者は無事に非表示化に成功し、解決済み。属性セレクタを使う方法は、同じクラスが他の要素で使われている場合でも意図しない要素を消さないため、より確実な対応として推奨された。

<div class="post-metadata">

**Author:** ![Panda2](https://avatars.discourse-cdn.com/v4/letter/p/85f322/32.png) [@Panda2](https://community.shopify.com/u/Panda2)\
**Post date:** [October 24, 2024, 5:21am UTC](https://community.shopify.com/t/topic/368746/1 "2024-10-24T05:21:32Z")

</div>

BtoBサイトを運営しています。

ログイン画面の「アカウントを作成する」ボタンを非表示にしたいのですが、カスタムCSSで指定することは可能でしょうか？

要素名がわからないため、この場合のCSSをご教示いただけますと幸いです。

何卒よろしくお願いします。

 ![スクリーンショット 2024-10-24 141815.png](https://canada1.discourse-cdn.com/shopifyforum/original/3X/d/d/dd429e2796cb41cb12e986b83e31840133e1cb2c.png)

---

<div class="post-metadata">

**Author:** ![wugk\_1](https://yyz1.discourse-cdn.com/shopifyforum/user_avatar/community.shopify.com/wugk_1/32/314785_2.png) [@wugk\_1](https://community.shopify.com/u/wugk_1)\
**Post date:** [October 24, 2024, 6:38am UTC](https://community.shopify.com/t/topic/368746/2 "2024-10-24T06:38:01Z")

</div>

こんにちは！

「アカウントを作成する」というテキストの要素が特定できないとCSSを当てることができないので、

1. 対象のページのURLを共有いただく
2. 開発者ツールなどでテキストの要素に付与されているidやclass(無ければ親子関係)を確認いただく

このどちらか対応いただければ回答できるかなと思います！

---

<div class="post-metadata">

**Author:** ![Panda2](https://avatars.discourse-cdn.com/v4/letter/p/85f322/32.png) [@Panda2](https://community.shopify.com/u/Panda2)\
**Post date:** [October 24, 2024, 7:19am UTC](https://community.shopify.com/t/topic/368746/3 "2024-10-24T07:19:32Z")

</div>

```markup

        アカウントを作成する
      

```

ご連絡ありがとうございます。

色々探るとこの部分にたどり着きました。恐らくこれに該当すると思います。

---

<div class="post-metadata">

**Author:** ![wugk\_1](https://yyz1.discourse-cdn.com/shopifyforum/user_avatar/community.shopify.com/wugk_1/32/314785_2.png) [@wugk\_1](https://community.shopify.com/u/wugk_1)\
**Post date:** [October 24, 2024, 3:56pm UTC](https://community.shopify.com/t/topic/368746/4 "2024-10-24T15:56:44Z")

</div>

ありがとうございます！

```markup
__web-inspector-hide-shortcut__

```

このクラスが他で使わていなければ素直に

```css
. __web-inspector-hide-shortcut__ {
  display: none;
}

```

これでいいのですが、他で使われている場合意図しない要素まで消えてしまうので、念のため

```css
a[href="/account/register"]. __web-inspector-hide-shortcut__ {
  display: none;
}

```

このように属性セレクタで指定してあげるのが良さそうです！

---

<div class="post-metadata">

**Author:** ![Panda2](https://avatars.discourse-cdn.com/v4/letter/p/85f322/32.png) [@Panda2](https://community.shopify.com/u/Panda2)\
**Post date:** [October 25, 2024, 2:49am UTC](https://community.shopify.com/t/topic/368746/5 "2024-10-25T02:49:27Z")

</div>

無事非表示にすることができました。ありがとうございました。
