Is it possible to have <meta name="viewport" and ignore media queries

There are a few threads about this:

http://stackoverflow.com/questions/2242086/how-to-detect-the-screen-resolution-with-javascript

1 Like

Let me see if I can follow you.

I would get a script with. say,

function getScreenWidth()

 

       {
           var de = document.body.parentNode;
           var db = document.body;
           if(window.opera)return db.clientWidth;
           if (document.compatMode=='CSS1Compat') return de.clientWidth;
           else return db.clientWidth;
        }

and then how would I call it from the html?

I don’t know enough Javascript to help. I’d make a thread in the JS section asking about all of this. Perhaps someone else can chip in, but I’m pretty sure what you want is impossible with HTML and CSS only. Media queries can’t render HTML with CSS.

1 Like

Many, many thanks, from the top of a mountain!

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.