@media Rule
Sets the media types for a set of styleSheet rules.
Syntax
HTML @media sMediaType { sRules } Scripting N/A
Possible Values
sMediaType
screen Output is intended for computer screens. Output is intended for printed material and for documents on screen viewed in Print Preview mode. all Applies to all devices. sRules One or more rules in a styleSheet object. The rule has no default value.
Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see dynamic properties.
Example
This example shows how to implement the @media rule.
Sample Code
// For computer screens, the font size is 12pt. @media screen { BODY {font-size: 12pt;} } // When printed, the font size is 8pt. @media print { BODY {font-size: 8pt;} }
Applies To
[ Object Name ] Platform Version Win16: Win32: Mac: Unix: WinCE: Version data is listed when the mouse hovers over a link, or the link has focus. STYLE
See Also
media
Did you find this topic useful? Suggestions for other topics? write us!
© 1999 microsoft corporation. all rights reserved. terms of use.