CSS media queries for iPhone -


I have a website that will be displayed on desktop and desktop so that media queries are used to serve different stylesheets. For example, if, for instance, desktop.css is loaded on the desktop, but if on iPhone (or if the user changes the browser window for size), instead of loading Iphone.css, but do not load desktop css anymore. Make and add to it also if used Gkrta is shifted to the iPhone either orientation CAS file based on that.

Eg

  / * Theme name: mywebsite * / @import "reset.css"; @ Media only screen and (minimum-device-width: 320px) and (max-device-width: 480px) {@import "desktop.css"; } @ Media only screen and (minimum-device-width: 320px) and (max-device-width: 480px) {@import "iphone.css"; @ Media All and (Orientation: Picture) {@import "iphone-portrait.css"; } @ Media All and (Orientation: Scenario) {@import "iphone-landscape.css"; }}   

All this should be done inside the stylesheet because I am building my website and want to use a CSS file in HTML only.

Can someone help me fix this which I need? Cheers.

Your @ import will come before all other content in your CSS.

If you want only 1 css file in HTML then why not copy and paste all those imports and where are you pasting them to import, i.e. .css @ media only for screen and reset (minimum-device-width: 320px) and (max-device-width: 480px) {// css for desktop}

  ...    

Comments