Home
CSS
CSS Templates
Tryit: Template 4
Run ❯
Get your
own
website
Result Size:
625 x 534
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html lang="en"> <head> <title>CSS Template</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> * { box-sizing: border-box; } body { margin: 0; font-family: Arial, Helvetica, sans-serif; } /* Style the side navigation */ .sidenav { height: 100%; width: 200px; position: fixed; z-index: 1; top: 0; left: 0; background-color: #111; overflow-x: hidden; } /* Side navigation links */ .sidenav a { color: white; padding: 16px; text-decoration: none; display: block; } /* Change color on hover */ .sidenav a:hover { background-color: #ddd; color: black; } /* Style the content */ .content { margin-left: 200px; padding-left: 20px; } </style> </head> <body> <div class="sidenav"> <a href="#">Link</a> <a href="#">Link</a> <a href="#">Link</a> </div> <div class="content"> <h2>CSS Template</h2> <p>A full-height, fixed sidenav and content.</p> </div> </body> </html>