HI THIS IS MY BLOG

THIS IS MY BLOG

HI THIS IS MY BLOG

Thursday, 16 April 2015


Multiple Style Sheets Using Media Queries

You don’t have to use multiple style sheets to accommodate for all the different screen sizes and browsers that your visitors might use. However, if you prefer a different style sheet for each design, then you can use the following code as an example to do so:
<link rel="stylesheet" media="screen and (max-width: 600px)" href="small.css" />
<link rel="stylesheet" media="screen and (min-width: 600px)" href="large.css" />
<link rel="stylesheet" media="print" href="print.css" />

For sake of efficiency though, it might be better to place multiple styles for different browsers and sizes into a single style sheet. This eliminates the need for multiple requests for several different sheets. Here are a couple of more examples.
@media screen and (min-width: 600px) {
     .sixhundredminwidthclass {
          width: 30%;
          float: right;
     }
}

and

@media screen and (max-width: 600px) {
     .sixhundredmaxwidth {
          clear: both;
          font-size: 1.3em;
     }
}

Related Posts:

  • 5 most expensive IPL flops It is said that money alone can’t buy happiness. Rightly so, money can’t guarantee success either. Just ask the cash-ri… Read More
  • CSK valuation issue to be discussed at BCCI meeting on April 26 New Delhi: The BCCI's Working Committee during its meeting i… Read More
  • J&K: All four convicts who raped and killed Tabinda Gani in Kupwara in 2007 given death sentence Kupwara: All four convicts in the rape and mu… Read More
  • IPL 8: Big IPL buys Yuvraj Singh, Dinesh Karthik struggling to get going Mumbai: Two players, who were bought for big money … Read More
  • IPL: Top 5 forgotten heroes The trend of one-season wonders emerging out of the blue only to fade away soon after has been one of the chief reaso… Read More

0 comments:

Post a Comment

Popular Posts

www.http://ananthalex.blogspot.in/. Powered by Blogger.