[Vuejs]-How to make a fixed header with a fixed side menu with element-ui

0👍

With position:fixed you could place something fixed, keep in mind that you also have to set the position of the parent element. Css should be like this:

.main-layout {
  position: relative;
}

.el-menu-layout {
    position: fixed;
    background: grey !important;
    left: 0;
    margin-top: 60px;
}

.el-header {
    position: fixed;
    background-color: white;
    height: 12%;
    top: 0;
    left: 0;
   right: 0;
}

.main-container {
  margin-top:60px;
  margin-left: 100px;
}

Leave a comment