From 2afc6ec1741992d45773496f5d724f030abb341f Mon Sep 17 00:00:00 2001 From: MickeyKay Date: Thu, 6 Nov 2014 16:39:54 -0800 Subject: [PATCH] Add responsive table CSS --- style.css | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/style.css b/style.css index a6246c2..8786f28 100644 --- a/style.css +++ b/style.css @@ -2079,6 +2079,63 @@ Media Queries } +/* Responsive Tables CSS +--------------------------------------------- */ +@media (max-width: 600px) { + + table { + clear: both; + } + + tr { + padding: 0.5em; + } + + th, + td { + padding: 0; + } + + table tbody td { + vertical-align: top; + } + + table thead { + display: none; + } + + table tbody { + line-height: 1.2; + } + + table tbody tr { + margin-top: 0.5em; + border: 1px solid #CCC; + } + + table tbody tr, + table tbody td { + display: block; + width: 100%; + height: auto; + } + + table tbody td { + display: block; + border: none; + } + + table ul { + margin: 5px 0px 10px 20px; + margin: 0.5rem 0 1rem 2rem; + } + + table li { + margin-bottom: .5em; + } + +} + @media (min-width: 768px) { /* General