Answers for "css get remaining width"

CSS
1

to make div take remaining space

html,
body {
  height: 100%;
  margin: 0;
}

.box {
  display: flex;
  flex-flow: column;
  height: 100%;
}

.box .row {
  border: 1px dotted grey;
}

.box .row.header {
  flex: 0 1 auto;
  /* The above is shorthand for:
  flex-grow: 0,
  flex-shrink: 1,
  flex-basis: auto
  */
}

.box .row.content {
  flex: 1 1 auto;
}

.box .row.footer {
  flex: 0 1 40px;
}
Posted by: Guest on November-07-2021
2

css div take remaining screen height

height:100vh;
/* 1vh is 1% of the browser size. With 100vh you can fill the complete height */
/* if you want the div to fill not only the size of the browser, but */
/* the complete website then use this: */
position: absolute;
height: 100%;
width: 100%;
Posted by: Guest on January-07-2021

Browse Popular Code Answers by Language