R
R
Rhamazan2015-06-12 11:24:33
HTML
Rhamazan, 2015-06-12 11:24:33

Is it possible to create a website that is responsive in width and height?

Good day. During the development of the site, doubts arose. Is it possible to make an adaptive layout of the main page so that all blocks are visible on any monitor without scrolling horizontally and vertically.
Examples in the attachment:
1920x1080
d19b0bf35d91411780790ae40e26b315.jpg
1280x800
dd299e0d346045dd8cb6964abb208ddf.jpg
768x1024
acbd00260cf84a2088bcf674ebf32919.jpg
Thank you.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
V
Valery, 2015-06-12
@batareika

Here is an example on flexbox: codepen.io/anon/pen/doRqYq
But this is more for general development

S
srko, 2015-06-12
@srko

Try viewport units: vw, vh, vmin, vmax .

A
Alexander Loginov-Solonitsyn, 2015-06-12
@kasheibess

Easy) To adjust to screen height

function setHeiHeight() {
    $('.min_height').css({
      height: $(window).height() + 'px'
    });
  }
  setHeiHeight(); // устанавливаем высоту окна при первой загрузке страницы
  $(window).resize( setHeiHeight ); // обновляем при изменении размеров окна

and in html we write
<meta name="HandheldFriendly" content="true">
  <meta name="viewport" content="width=1000">

and
And for the width, already use media queries htmlbook.ru/css/value/media
ps Of course, the entire site should be in 1 block with the min_height class in my case

R
Rodion Svetlitskiy, 2015-06-12
@rsvetlitskiy

Try like this codepen.io/Rodion77/pen/XbgPEE?editors=110

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question