JSFiddle - React, Tailwind, and code Playground
by whelkaholism
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Responsive Admin Dashboard</title>
<style>
/* Basic Reset */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: Arial, sans-serif;
display: flex;
min-height: 100vh;
background-color: #f4f4f4;
color: #333;
}
/* Sidebar Styles */
.sidebar {
width: 250px;
background-color: #2c3e50;
color: white;
position: fixed;
top: 0;
left: 0;
height: 100%;
padding-top: 20px;
transition: all 0.3s ease;
}
.sidebar h2 {
text-align: center;
margin-bottom: 30px;
font-size: 24px;
}
.sidebar ul {
list-style-type: none;
padding: 0;
}
.sidebar ul li {
padding: 15px 20px;
cursor: pointer;
}
.sidebar ul li:hover {
background-color: #34495e;
}
.sidebar ul li a {
color: white;
text-decoration: none;
}
/* Main Content Area */
.main-content {
margin-left: 250px;
padding: 20px;
flex: 1;
}
.main-content h1 {
margin-bottom: 20px;
font-size: 28px;
color: #34495e;
}
/* Table Styles */
table {
width: 100%;
border-collapse: collapse;
background-color: white;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
table th, table td {
padding: 15px;
text-align: left;
border-bottom: 1px solid #ddd;
}
table th {
...