Skip to content

Commit f66ce62

Browse files
author
Di Wang
committed
fixed a side bar bug
1 parent 70c31d6 commit f66ce62

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

src/app/dashboard/root/root.component.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
.sidebar{
1111
width: 260px;
12-
position: relative;
12+
position: fixed;
1313
height: 100%;
1414
background-color: #D80B0B;
1515
box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.42), 0 4px 25px 0px rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.2);
@@ -18,6 +18,7 @@
1818
.main-panel{
1919
width: 100%;
2020
flex: 1;
21+
padding-left: 260px;
2122
}
2223

2324
.sidebar-background{

src/app/dashboard/root/root.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<app-sidebar></app-sidebar>
44
<div class="sidebar-background" style="background-image: url(../assets/img/sidebar-1.jpg)"></div>
55
</div>
6-
<div class="main-panel">
6+
<div class="main-panel" id="main-panel">
77
<router-outlet></router-outlet>
88
</div>
99
</div>

src/styles.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,14 @@ p {
178178
#sidebar, #nav-right, #nav-left-button{
179179
display: none;
180180
}
181+
#main-panel{
182+
padding-left: 0;
183+
-webkit-transition: all 400ms;
184+
-moz-transition: all 400ms;
185+
-ms-transition: all 400ms;
186+
-o-transition: all 400ms;
187+
transition: all 400ms;
188+
}
181189
}
182190

183191
/* input text style */

0 commit comments

Comments
 (0)