DETROIT – As you may know, you can use the @media rule to make certain CSS code take effect only if the specified condition is true. However, there’s another way to create media queries: You can put them right in the link elements that call your external stylesheets. Instead of using the “@” sign, just use media as an attribute.
For example, the following two pieces of code (the first in an external stylesheet or style tag, the second directly in the head section of an HTML document) can be used to perform essentially the same function:
@media only screen and (min-width:1000px){
/* Write CSS code here */
}
One difference between the two is that in the second case, if the media query condition isn’t satisfied, the page may be able to start rendering sooner, because the browser sees that none of the CSS in min1000.css is needed. Note that the browser will probably still load the external file though, as it expects that it might need to refer to it later.
Choosing proper training or certification paths is often difficult, but our clients appreciate how easy we make that process. New Horizons can help your company align the appropriate learning solutions to each of your department?s needs, including software upgrades or company-wide deployment.
Click Here if you would like to learn more about CSS training offerings.





