Deny Message Because Screen Is Too Small

2 replies
  • WEB DESIGN
  • |
Hi all,

I have one page that I do not want accessed by mobile (or notebook).

How can I fix this so that when someone goes to the site (on a mobile phone), they will see a "Sorry - screen too small" message?

I found something here:
http://stackoverflow.com/questions/1...ing-my-website

but now I am wondering if there is a better approach..

TIA
#deny #message #screen #small
  • Profile picture of the author 2WDHost
    Hi.

    Have you considered using @media ( CSS3 @media Rule ) to hide the content and show "Sorry - screen too small" message?
    {{ DiscussionBoard.errors[10134874].message }}
  • Profile picture of the author raresmp
    Using media queries is an easy and convenient solution.

    Have a look at this:
    Code:
    @media (max-width: 767px) {
    	.yourwrapper {display: none;}
    }
    Simply make your wrapper div "hidden" (don't use "visibility:hidden") and make your message appear using the exactly opposite approach.

    Good luck
    {{ DiscussionBoard.errors[10135167].message }}

Trending Topics