Toggle navigation
☰
HTML
CSS
Scripting
Database
<!doctype html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Tailwind CSS Fixed Sidebar Layout</title> <script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4.2.1"></script> </head> <body class="bg-gray-50 font-sans"> <!-- Fixed Sidebar --> <aside class="fixed inset-y-0 left-0 z-50 w-64 bg-slate-900 shadow-2xl overflow-y-auto hidden md:block"> <div class="p-8 h-full flex flex-col"> <div class="text-white font-black text-2xl mb-12 italic tracking-tighter">FIXED.</div> <nav class="flex-1 space-y-6"> <div class="space-y-2"> <p class="text-[10px] font-bold text-slate-500 uppercase tracking-[0.2em] mb-4">Foundation</p> <a href="##" class="block text-sm font-bold text-white hover:translate-x-2 transition-transform">Architecture</a> <a href="##" class="block text-sm font-bold text-slate-400 hover:text-white transition-colors">Components</a> </div> <div class="space-y-2"> <p class="text-[10px] font-bold text-slate-500 uppercase tracking-[0.2em] mb-4">Extensions</p> <a href="##" class="block text-sm font-bold text-slate-400 hover:text-white transition-colors">Plugins</a> <a href="##" class="block text-sm font-bold text-slate-400 hover:text-white transition-colors">Integrations</a> </div> </nav> <div class="mt-auto pt-8 border-t border-slate-800"> <button class="w-full bg-slate-800 text-white py-3 rounded-lg text-xs font-black uppercase hover:bg-slate-700 transition">Update Log</button> </div> </div> </aside> <!-- Content with left margin for desktop --> <div class="md:ml-64 flex flex-col min-h-screen"> <header class="h-16 bg-white border-b border-gray-100 flex items-center justify-between px-8 sticky top-0 z-40"> <div class="flex items-center md:hidden"> <button class="p-2 text-slate-600"> <svg class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" /></svg> </button> </div> <div class="flex items-center space-x-4 ml-auto"> <button class="text-xs font-black text-slate-400 uppercase tracking-widest hover:text-slate-900 transition">Search</button> <div class="h-8 w-8 rounded-full bg-slate-100"></div> </div> </header> <main class="flex-1 p-8 lg:p-12"> <div class="max-w-4xl mx-auto space-y-12"> <section> <h1 class="text-5xl font-black text-slate-900 mb-6 tracking-tight leading-none">Immersive Layout.</h1> <p class="text-xl text-slate-500 leading-relaxed">The fixed sidebar remains visible while the main content area scrolls independently. This is the gold standard for documentation and complex web applications.</p> </section> <!-- Demonstrating long content --> <div class="space-y-8"> <div class="h-64 bg-white rounded-3xl border border-gray-100 shadow-sm"></div> <div class="h-64 bg-white rounded-3xl border border-gray-100 shadow-sm"></div> <div class="h-64 bg-white rounded-3xl border border-gray-100 shadow-sm"></div> </div> </div> </main> <footer class="bg-white border-t border-gray-100 p-8 text-center text-xs font-bold text-slate-400 uppercase tracking-widest"> © 2026 Layout Engine </footer> </div> </body> </html>