mobile - How to reload the CSS file after orientation change (phone)? -


for gallery on website use media queries readjust image sizes depending on screen width (i use folio theme galleria) , image size supposed change when tilt phone - happens after reload manually. (adding orientation landscape or portrait doesn't anything).

so basically, want avoid reloading whole page because involves reloading images - information in css file, can reload file individually?

thanks bunch!

all recent smartphone , tablet browsers support media queries based on orientation, see article here. mentioned there supported ios 4.0 upwards. if scroll down bonus: iphone support section provides workaround phones quirky triggering automatically.

if specify media query part of css include shouldn't loaded until becomes applicable, automatically solving problem.

if still run platforms have problems, can use javascript onorientationchange event fallback, using example mootools utility/asset load images , stylesheets @ runtime, or jquery counterpart.


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -