media-feature

Device height — CSS reference

Deprecated output-device height rather than current viewport height. Use height for responsive layout. This fixture compares the media-query result with applied styling in the installed browser. A false match alone is not proof that the syntax is unsupported.

Formal Syntax & Structure

css syntaxcss
@media (device-height: 800px) { … }

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>device-height</title><style>body{margin:8px;font:16px/20px sans-serif;color:black;background:white}#a{color:green}@media (device-height: 800px){#a{color:blue}}</style><body><p id="a">Example text</p></body></html>
CSS Reference