---
title: "How can hide specific elements on mobile devices using CSS?"  
description: "How can hide specific elements on mobile devices using CSS?"  
author: "Revati S Misra"  
published: 2023-06-07  
updated: 2023-06-09  
canonical: https://www.mindstick.com/forum/158681/how-can-hide-specific-elements-on-mobile-devices-using-css  
category: "css-css3"  
tags: ["css", "css transform"]  
reading_time: 2 minutes  

---

# How can hide specific elements on mobile devices using CSS?

How can hide specific [elements](https://www.mindstick.com/forum/1440/wpf-button-with-multiple-text-elements) on [mobile devices](https://yourviews.mindstick.com/view/85524/influence-of-mobile-devices-on-travel-and-tourism-experiences) using [CSS](https://www.mindstick.com/forum/514/background-gradient-ie7-css-problem)?

## Replies

### Reply by Aryan Kumar

To hide specific elements on [mobile](https://www.mindstick.com/articles/310668/reasons-why-you-should-choose-custom-mobile-app-development-for-your-business) [devices](https://www.mindstick.com/blog/301912/how-smart-devices-are-changing-our-lives) using CSS, you can use the following steps:

1. **Add a class to the element you want to hide.** For example, you could add the class hidden-mobile to the element.
2. **Create a media query that targets mobile devices.** The media query should specify a screen width that is less than or equal to the width of a mobile device. For example, the following media query would target devices with a screen width of 768px or less:

Code snippet

```plaintext
@media screen and (max-width: 768px) {
  .hidden-mobile {
    display: none;
  }
}
```

1. **Place the media query in your CSS stylesheet.** The media query should be placed in the @media block of your CSS stylesheet.

Once you have completed these steps, the element with the hidden-mobile class will be hidden on mobile devices.

Here is an example of how to hide a div element on mobile devices using CSS:

Code snippet

```plaintext
<div class="hidden-mobile">
  This div will be hidden on mobile devices.
</div>
```

Code snippet

```plaintext
@media screen and (max-width: 768px) {
  .hidden-mobile {
    display: none;
  }
}
```

This code will hide the div element on mobile devices. You can use this technique to hide any element on mobile devices using CSS.


---

Original Source: https://www.mindstick.com/forum/158681/how-can-hide-specific-elements-on-mobile-devices-using-css

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
