D
D
Drovosek012018-10-04 14:59:41
css
Drovosek01, 2018-10-04 14:59:41

How to stretch a div so that it moves other divs to fit the window borders?

I'm trying to "pull" the layout on wordpress. Split one page into several.
https://paulderden.000webhostapp.com/contacts/
I would like there to be no white space at the bottom, and the block with contacts would occupy the remaining space in the center.
I tried to set this block (class="contacts") to height: auto and 100%, etc.
I suppose that he will have to remove the padding, put

display: flex;
justify-content: space-between

But how to make the block with contacts "spread" the header and footer to the edges of the window?
5bb600a7db006895380214.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
AngReload, 2018-10-04
@Drovosek01

html, body {
  height: 100%;
}
body {
  display: table;
  width: 100%;
}
#contacts {
  display: table-row;
  height: 100%;
}
#contacts > .container {
  display: table-cell;
  vertical-align: middle;
}

5bb6086fe0cb4613799748.png

S
siarheisiarhei, 2018-10-04
@siarheisiarhei

find the server first...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question