Full dashboard layout — sidebar + KPIs + charts + table
The complete data-science dashboard: sidebar nav, KPI row, 2-column charts, data table.
style.css
v3.1
style.css — the CSS rules
index.html — the HTML structure (what the CSS targets)
Live preview
updates as you type
🧠 How it works
This is the COMPLETE dashboard pattern a data scientist needs: Grid: 220px sidebar + 1fr main. min-height: 100vh so the sidebar goes full height. Sidebar links: padding-left 1.5rem, border-left appears on active/hover — clear navigation. KPI row: repeat(auto-fit, minmax(180px, 1fr)) — responsive! 4 on desktop, 2 on tablet, 1 on mobile. Each KPI: label (small grey) + value (big bold) + change (green up / red down). Charts grid: 2 columns on desktop, 1 column on mobile (@media query). chart-area has a fixed height (200px) — all charts in the grid are the same size. Every card has the same border + border-radius + padding — visual consistency.
✏️ Try these changes
-
Change grid-template-columns: 220px 1fr to 280px 1fr→ wider sidebar -
Change the KPI minmax from 180px to 250px→ fewer KPIs per row -
Change the charts-grid from 1fr 1fr to 1fr 1fr 1fr→ 3 charts per row -
Change @media max-width: 768px to 1024px→ charts stack earlier (on tablets) -
Change the sidebar background to #0d1117→ sidebar becomes darker (GitHub-style)