Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

Tip: Conditionally Load CSS Files Based on the Media

Learn how to use the link tag in HTML to load CSS files based on certain conditions.


advertisement

The link tag in HTML supports the media element that allows you to specify the media type, and additional conditions such as the width and load a specified CSS file. For example, the following link tag loads a CSS file called "longWidth.css" only if the media is of type "Screen" and its width matches the minimum and maximum values specified.

css" /

 

Visit the DevX Tip Bank

 





   
Srinath M. S. says: "I would love to leave a footprint in this flat world."
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date