![]() |
Languages: |
English |
Using CSS style sheets, it is possible to use a set of directives(styles) depending upon the device being used to browse web pages.
The recognised media types are:
You can assign a media type to a CSS declaration with the following syntax
@media print { body { font-size: 12pt; font-color: #000000; } }
To assign more than one declaration style to more than one media type:
@media print, handheld{ body { font-size: 12pt; font-color: #000000; } img { max-width: 100%; height: auto; } }
The directives can be used in the main CSS file or in a separate style sheet for a given media type. There must be an include to the CSS file in the templates <head> section (the following is taken from the Joomla! Beez template):
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/beez/css/print.css" type="text/css" media="Print" />