Openwave Mobile Browser 7.0: XHTML Mobile Profile and CSS Reference

Section 18 out of 38 total sections
Current chapter: CSS Reference

Using Media Rules

You can create one style sheet that has different rules for different media, such as handheld, screen, print, and so on. You do this by enclosing the style rules for each media type within @media rules.

The Openwave Mobile browser uses the media types handheld and all.

The following example style sheet sets one rule for all media types and then separate rules for handheld and screen media types.

@media all {
    li {list-style-type: square}
    }
@media handheld {
    li {color: red}
    }
@media print {
    li {color: black}
    }

You can use media rules in standalone CSS files and in internal style sheets, included in the <style> element.