Hiding a Module at Higher Screen Size (Mobile Browser "Desktop Version")

General questions relating to Joomla! 3.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Post Reply
JohnSmithers
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 227
Joined: Mon Feb 11, 2013 9:22 am

Hiding a Module at Higher Screen Size (Mobile Browser "Desktop Version")

Post by JohnSmithers » Thu May 13, 2021 5:53 pm

So there was this post recently: viewtopic.php?f=706&t=986319

I have a related issue. I have been able to display a message - "mobilenotice" - to users using mobiles, it requests them to select the "desktop version" of their browser. The message only appears at lower screen sizes. The code reads:

Code: Select all

@media screen and (max-width: 471px) {
   .mobilenotice {
  display: inline;
  text-align: justify;
}
}
On desktops at smaller screen widths the message appears. On mobiles the message appears.

The issue is on mobiles, when the "desktop version" is used the "mobilenotice" message is still there.

Can anyone explain why this issue occurs and how to rectify it please?

JohnSmithers
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 227
Joined: Mon Feb 11, 2013 9:22 am

Re: Hiding a Module at Higher Screen Size (Mobile Browser "Desktop Version")

Post by JohnSmithers » Thu May 13, 2021 10:56 pm

I appear to have a cache issue with my phone. Got it working.

Code: Select all

.mobilenotice {
  display: none !important;
}
and then

Code: Select all

  
   @media screen and (max-width: 471px) {
   
  .mobilenotice {
  display: inline !important;
 
}
}
It is a bit off topic but seems a disadvantage that you can't program easily for "desktop" versions for mobiles, or am I wrong?

Any information on this would be appreciated.


Post Reply

Return to “General Questions/New to Joomla! 3.x”