How to Link A Separate Style-Sheet Using Media Queries
How to Link A Separate Style-Sheet Using Media Queries
Hi Everybody,
Adding the specific code for devices inline might be a good way to use media queries if you only need to make a few changes, however if your stylesheet contains a lot of overwriting or you want to completely separate the styles shown to desktop browsers and those used for small screen devices, then linking in a different stylesheet will enable you to keep the CSS separate.
To add a separate stylesheet after your main stylesheet and use the cascade to overwrite the rules, use the following :
1
<link rel="stylesheet" type="text/css" media="only screen and (max-device-width: 480px)" href="small-device.css" />
Adding the specific code for devices inline might be a good way to use media queries if you only need to make a few changes, however if your stylesheet contains a lot of overwriting or you want to completely separate the styles shown to desktop browsers and those used for small screen devices, then linking in a different stylesheet will enable you to keep the CSS separate.
To add a separate stylesheet after your main stylesheet and use the cascade to overwrite the rules, use the following :
1
<link rel="stylesheet" type="text/css" media="only screen and (max-device-width: 480px)" href="small-device.css" />
Similar topics
» Other Popular Style Sheet Languages in the Market
» Using Media Queries to create a stylesheet for phones
» Link Building With Social Media
» Create separate pages for your different locations
» Google March Updates for Navigational Queries
» Using Media Queries to create a stylesheet for phones
» Link Building With Social Media
» Create separate pages for your different locations
» Google March Updates for Navigational Queries
Permissions in this forum:
You cannot reply to topics in this forum