+ Reply to Thread
Results 1 to 2 of 2

CSS Media Types

This is a discussion on CSS Media Types within the Web Design forums, part of the Web Designing & Development category; Media Types allow you to specify how documents will be presented in different media. The document can be displayed differently ...

Share/Bookmark
  1. #1
    Senior Member Array akash's Avatar
    Join Date
    Oct 2008
    Location
    Heaven (Earth)
    Posts
    500

    Default CSS Media Types

    Media Types allow you to specify how documents will be presented in different media. The document can be displayed differently on the screen, on the paper, with an aural browser, etc.
    Media Types

    Some CSS properties are only designed for a certain media. For example the "voice-family" property is designed for aural user agents. Some other properties can be used for different media types. For example, the "font-size" property can be used for both screen and print media, but perhaps with different values. A document usually needs a larger font-size on a screen than on paper, and sans-serif fonts are easier to read on the screen, while serif fonts are easier to read on paper.
    The @media Rule

    The @media rule allows different style rules for different media in the same style sheet.
    The style in the example below tells the browser to display a 14 pixels Verdana font on the screen. But if the page is printed, it will be in a 10 pixels Times font. Notice that the font-weight is set to bold, both on screen and on paper:
    Code:
    <html>
    <head>
    <style>
    @media screen
      {
      p.test {font-family:verdana,sans-serif;font-size:14px}
      }
    @media print
      {
      p.test {font-family:times,serif;font-size:10px}
      }
    @media screen,print
      {
      p.test {font-weight:bold}
      }
    </style>
    </head>
    
    <body>
    ....
    </body>
    </html>

  2. #2
    Senior Member Array msn90's Avatar
    Join Date
    May 2009
    Location
    india
    Posts
    146

    Default Re: CSS Media Types

    I have first time listen about css media types. you have explain it in the brief and in easy way. It is to understand thanks for sharing it.



+ Reply to Thread

Similar Threads

  1. All the list style types
    By akash in forum Web Design
    Replies: 0
    Last Post: 05-01-2009, 07:59 AM
  2. What types of aerial billboards can I get produced?
    By ironsteel in forum Advertising & Promotion
    Replies: 0
    Last Post: 02-28-2009, 09:42 AM
  3. Replies: 0
    Last Post: 04-14-2008, 07:31 AM
  4. what types of ads pay the most on adsense?
    By Mike M in forum Google
    Replies: 2
    Last Post: 01-10-2008, 09:44 AM
SEO Forum | Web Hosting Forum | Websites For Sale |