CSS your HTML partner ! !

CSS your HTML partner! !

Click here to visit Our forum here!

Wednesday, March 23, 2011

Css media type

Link Us To : http://sn.im/27pgrc / http://tinyurl.com/3vuq33z
Media type are allow to specify how document will be presented in different media.
The @media rule:
The @media rule allow different style rule use for different media in the same style sheet.


Example below tell the browes to display a 14 pixels verdana font on the screen but if the page is printed,it become 10 pixels times font.
<>
<>
<>
@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>
< /html>
Reference:
Css Media Type [Online], Retrieved 23/3/2011
URL:http://www.w3schools.com/css/css_mediatypes.asp


No comments:

Post a Comment