How to Hide a
From Mobile Devices

Wondering how to hide a <div> tag from mobile users? Here’s a quick CSS fix on how to do that. You can make use of the Mobile CSS tags.

There are various reasons why you may want to hide a div from your users. Take note that this method works not only for div tags but all HTML tags. You can use this trick easily using CSS.

Easily Hide <div> tags From Mobile Devices

First, determine the div tag you want to hide your mobile devices for an easy overview we will make an example below.

<div class="hidemobile">
	<h2>This div will be hidden</h2>
	<p>No, you can't see this tag if you are using mobile</p>
@media only screen and (max-width: 600px) {

Parameters used:

Media Screen set to Max-width 600px meaning only screens with less than 600px are able to see the content under this tag.

You can set multiple screen sizes depending on how you use it.

Faire un commentaire

Votre adresse email ne sera pas publiée.

Vous pouvez agrandir la zone de commentaire en tirant sur la flèche. Si vous êtes un technicien, vous pouvez utiliser des balises et des attributs HTML de base pour mettre en forme votre commentaire.