We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.
Conditionally Load CSS Files Based on the Media

Submitted by: Srinath M S(srinath_ms@yahoo.com)

Friday Nov 17th 2017 by Srinath M S

Language: Web, Expertise: Intermediate - Learn how to use the link tag in HTML to load CSS files based on certain conditions.

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" /
Mobile Site | Full Site
Copyright 2018 © QuinStreet Inc. All Rights Reserved