asp.net - CSS for mobile sometimes reverts back to original -


so of time stylesheets appear properly. standard/original 1 works flawlessly, seems mobile 1 disregarded when looked @ mobile device

i have them designated follows:

<link href="customstylesheets/standard.css" rel="stylesheet" type="text/css" /> <link href="customstylesheets/mobile.css" rel="stylesheet" type="text/css" media="only screen , (max-device-width: 799px)" /> 

i'm using droid x view page, in portrait mode, device width shouldn't exceeding max-width specified above, sometimes, randomly, still reverts original css page.

any way keep doing so?

make sure standard.css isn't affecting cascade of expect see mobile.css. looks though mobile device load standard.css first mobile.css - styles in both stylesheets affecting display. wrap stylesheet link elements in logic displays mobile stylesheet mobile device - not both stylesheets @ same time.

also, don't forget include meta tag make sure page being scaled correctly device dimensions:

<meta name="viewport" content="width=device-width" /> 

Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -