Jump to content

Function to hidde a <div> in all smarthphone and tables bu able do view in desktop ?


Screamfox

Recommended Posts

Hello Devs,

I have a little problem well in my homepage.tpl i have added a map to point where servers are located but, in smartphones view this map causes some dis-formation and i would like to hide the <div ... > for all smartphone and all tables but still unable to view in Desktop and in Laptop or Servers,

Any idea ? 

@brian!

Rgds,
Screamfox

Link to comment
Share on other sites

Hi,

if you wanna hide it only for mobile and tablets this is easy as that.

Define your min / max width and call with css display: none thats all.

Help Guide https://www.w3schools.com/cssref/css3_pr_mediaquery.asp

 

@media screen and (max-width: 767px){
       .div_hide{display: none;}
}

add the class to the <div> you wanna hide

<div class="div_hide"> My map I wanna hide </div>

Greetings Christian

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated