# Trying to hide the Share button with CSS

**URL:** https://meta.discourse.org/t/trying-to-hide-the-share-button-with-css/105045
**Category:** Support
**Created:** [December 25, 2018, 10:14pm UTC](https://meta.discourse.org/t/trying-to-hide-the-share-button-with-css/105045 "2018-12-25T22:14:10Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![L30110](https://avatars.discourse-cdn.com/v4/letter/l/eb9ed0/32.png) [@L30110](https://meta.discourse.org/u/L30110)
#### Post date: [December 25, 2018, 10:14pm UTC](https://meta.discourse.org/t/trying-to-hide-the-share-button-with-css/105045/1 "2018-12-25T22:14:10Z")

</div>

Forum is private, so want to discourage users from trying to share URLs. Already removed share from the post menu setting, but the button persists. Also tried CSS from various posts here, none seem to work. Is there a known CSS that definitely works to remove Share from the current distribution? Thanks.

---

<div class="post-metadata">

### Author: ![L30110](https://avatars.discourse-cdn.com/v4/letter/l/eb9ed0/32.png) [@L30110](https://meta.discourse.org/u/L30110)
#### Post date: [December 25, 2018, 10:23pm UTC](https://meta.discourse.org/t/trying-to-hide-the-share-button-with-css/105045/2 "2018-12-25T22:23:08Z")

</div>

I got this to work:

```css
.topic-footer-main-buttons .share.btn {
    display: none; 
}

```

Now trying to kill the Invite button!

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [December 25, 2018, 10:23pm UTC](https://meta.discourse.org/t/trying-to-hide-the-share-button-with-css/105045/3 "2018-12-25T22:23:13Z")

</div>

Specifically which button? The one at the bottom of the topic?

If so, try this:

```plaintext
.topic-footer-main-buttons .btn-default.share {
    display: none;
}

```

> [@L30110](#):
>
> Now trying to kill the Invite button!

```plaintext
.topic-footer-main-buttons .btn-default.invite-topic{
    display: none;
}

```

* * *

Also, please try and select a category when you make posts here on Meta.

---

<div class="post-metadata">

### Author: ![L30110](https://avatars.discourse-cdn.com/v4/letter/l/eb9ed0/32.png) [@L30110](https://meta.discourse.org/u/L30110)
#### Post date: [December 25, 2018, 10:24pm UTC](https://meta.discourse.org/t/trying-to-hide-the-share-button-with-css/105045/4 "2018-12-25T22:24:21Z")

</div>

Yeah, that’s the one I ultimately used. Now trying to kill the Invite button at the bottom of posts. Forgot to choose the category, sorry. I wish there was a way to force users to select a category when you don’t want to use uncategorized!

---

<div class="post-metadata">

### Author: ![L30110](https://avatars.discourse-cdn.com/v4/letter/l/eb9ed0/32.png) [@L30110](https://meta.discourse.org/u/L30110)
#### Post date: [December 25, 2018, 10:25pm UTC](https://meta.discourse.org/t/trying-to-hide-the-share-button-with-css/105045/5 "2018-12-25T22:25:38Z")

</div>

Actually, since regular users can’t see Invite under my configuration, it’s not a big deal.

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [December 25, 2018, 10:26pm UTC](https://meta.discourse.org/t/trying-to-hide-the-share-button-with-css/105045/6 "2018-12-25T22:26:00Z")

</div>

> [@L30110](#):
>
> I wish there was a way to force users to select a category when you don’t want to use uncategorized!

There is, disable #Uncategorized. We do not want to disable it here on Meta as there are truly uncategorizable topics, but this isn’t one 😉.

As for invite, see my reply above.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [November 21, 2021, 11:06am UTC](https://meta.discourse.org/t/trying-to-hide-the-share-button-with-css/105045/10 "2021-11-21T11:06:15Z")

</div>



---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [November 27, 2021, 2:53pm UTC](https://meta.discourse.org/t/trying-to-hide-the-share-button-with-css/105045/11 "2021-11-27T14:53:46Z")

</div>


