Semantic react / height 100% page [closed]

China☆狼群 提交于 2020-01-17 14:05:21

问题


I am trying to make my menu occupy 100% of the screen height, but I can't do it

my sand: https://codesandbox.io/s/brave-http-wiu8u


回答1:


You need to update your CSS for to apply height match to the screen using the following CSS : codesandbox

CSS

html,
body {
  height: 100vh !important;
}

#root,
.App,
.ui.fluid.container,
.ui.grid,
.ui.menu {
  height: 100% !important;
}

.ui.menu {
  border-radius: 0px !important;
  border: 0px !important;
  box-shadow: none !important;
  background-color: #252631 !important;
}

.ui.menu .item {
  padding: 8px !important;
}

.ui.button .icon {
  margin-left: 5px !important;
  margin-right: 15px !important;
  background-color: transparent !important;
}

.btnMenu {
  width: 100% !important;
  height: 50px;
  color: white !important;
  text-align: left !important;
  margin: 0 !important;
  background-color: transparent !important;
}

.btnMenu:hover {
  color: white !important;
  background-color: rgba(186, 186, 186, 0.4) !important;
}

.logo {
  height: 60px;
  width: 100% !important;
}

.ui.vertical.menu .item {
  display: flex !important;
  align-items: center !important;
}

.ui.divider {
  height: 2px !important;
  margin-top: 0 !important;
  margin-bottom: 20px !important;
}

/*ui container*/

.menu {
  padding: 0 !important;
  margin: 0 !important;
  width: 240px !important;
}



回答2:


could be helpful

.menu {
  padding: 0 !important;
  margin: 0 !important;
  width: 240px !important;
  height: 100%;
}


  <Container fluid style={{height: "500px", background: "#000" }}>


来源:https://stackoverflow.com/questions/59621362/semantic-react-height-100-page

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!