Trying to hide a module from appearing on a mobile device the Module is dnn sharp action grid
So in the portal.css file I added the following:
@media only screen and (max-width: 768px) {
.hide-mobile {
display: none !important;
}
And then in module advanced setting under header tag I placed the following
This content will only be visible on tablets and desktops.
This does not hide the hide the module on a mobile device – what am I missing?
Thanks
Bob
oops
in the module under header tag i placed
why is css not showing up
meta name="viewport" content="width=device-width, initial-scale=1"> div class="hide-mobile"> This content will only be visible on tablets and desktops. div>
@Bob M, html, xml, and css needs to be surrounded by "code" tags to be properly displayed. Here is some documentation on that:
https://github.com/DNNCom...-To-Enter-XML-&-HTML
Just a guess here but I think there is a new security setting in DNN 9.13.10 (and somewhere in the DNN 10 version lineage, 10.2?) to enable html in the module header.
Trying to hide a module from appearing on a mobile device the Module is dnn action grid
then in module advanced setting under header tag I placed the following
<code><meta name="viewport" content="width=device-width, initial-scale=1"></code>
<code><<div class="hide-on-mobile"></code>
<code></div></code>
Well, in the code I see a div opening with << so that could create an issue.
Another thing is that the class name in the HTML is not the same as the css class.
I never tried to add the HTML in the header tag btw. I either add the class in the HTML of the module or use the ID of the module to set the display none
Tycho thanks for that information
These Forums are for the discussion of the open source CMS DNN platform and ecosystem.
For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:
Awesome! Simply post in the forums using the link below and we'll get you started.