I'm working on Admin panel for my Portfolio page.
body {
margin: 0;
background-color: #E0E0E0;
}
.navbar {
width: 100%;
height: 40px;
background-color: #21262a;
position: fixed;
top: 0;
display: block;
}
.navbar .adminText {
color: #d9f3fe;
position: absolute;
font-family: sans-serif;
top: 50%;
margin-left: 10px;
transform: translateY(-50%);
text-transform: uppercase;
font-weight: 600;
cursor: default;
user-select: none;
}
.navbar .logout {
float: right;
position: relative;
top: 50%;
transform: translateY(-50%);
border-style: none;
height: 100%;
width: 100px;
background-color: #21262a;
color: #d9f3fe;
transition: .2s;
}
.logout:hover {
background-color: #181b20;
cursor: pointer;
}
.logout:focus {
outline: none;
}
.control {
height: calc(100% - 40px);
width: 20%;
background-color: #21262a;
position: fixed;
left: 0;
bottom: 0;
}
.control .dashboard {
position: relative;
width: 100%;
height: 50px;
border: none;
background-color: #21262a;
color: #d9f3fe;
font-size: 1.1em;
transition: .3s;
text-align: left;
}
.control .dashboard:hover {
background-color: #181b20;
cursor: pointer;
}
.control .dashboard:focus {
outline: none;
}
.control .dashboard i {
margin-right: 10px;
float: left;
margin-left: 10px;
}
.workStation {
position: absolute;
height: calc(100%-40px);
width: 80%;
right: 0;
top: 40px;
z-index: 100;
}
#active {
background-color: #006da0;
}
#active:after {
content: "";
height: 20px;
width: 20px;
position: absolute;
background-color: #E0E0E0;
transform: rotate(45deg);
right: -10px;
}
<head>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css">
</head>
<div class="navbar">
<h class="adminText">Zenzzex Portfolio Admin Panel</h>
<button class="logout">LOGOUT</button>
</div>
<aside class="control">
<button class="dashboard" id="active"> <i class="fas fa-tachometer-alt"></i> Dashboard</button>
<button class="dashboard"> <i class="fas fa-images"></i> Posts</button>
<button class="dashboard"> <i class="fas fa-plus-square"></i> Add post</button>
</aside>
<aside class="workStation">
<h1>THis is DASHBOARD</h1>
</aside>
That's my page.
Now, I will have it linked to my database, I'm doing it in PHP, but for now I'm working on frontend.
So When I click on Posts
I want to display content for that page in this gray area that is empty.
I think You know What I mean by now. So what's the best way to do it? Keep in mind, I'm doing my backend system in PHP.