/ Published in: HTML
CSS 3 media queries test for html, table columns disappear when browser window width is changed; Fx 3.1
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="keywords" content="css, html, media queries, css3" /> <meta name="description" content="Test CSS 3 media queries dla html" /> <style> table{ width: 100%} table td:nth-of-type(1){ background: blue; color: white; } table td:nth-of-type(2){ background: red } table td:nth-of-type(3){ background: green; color: white } table td:nth-of-type(4){ background: yellow; } @media screen and (max-width: 510px){ table td:nth-of-type(4){ display: none; } } @media screen and (max-width: 383px){ table td:nth-of-type(3){ display: none; } } @media screen and (max-width: 281px){ table td:nth-of-type(1){ display: none; } } </style> </head> <body> <table border="1" summary="ZnikajÄ…ca tabela"> <thead> </thead> <tbody> </tbody> </table> </body> </html>
URL: http://sulleii.googlepages.com/media-queries-css-svg-html.htm