Is there a best practice for handling browser size?

I feel GMail is a great example of best practice in action, but I'm looking for a more theoretical approach based on code. CSS? Javascript? Jquery Let me hear it.

+3
source share
3 answers

Most web applications use the correct document layout and CSS to make the stream work on its own when the user resizes the browser window without running any script at all. This is exactly what to CSS-properties display, position, float, clear, etc. For.

+3
source

, ...

- / , .

...

0

- this.

, (#main, ), 2 div : #left #right.

left - div width:200px float:left.

right - , , #left, #right #leftmargin:0 0 0 200px.

To prevent #rightfrom small, you give it a minimum width min-width:400px. Now, when you resize the window #right, the size will change until #rightit reaches the value 400px, then the scroll bars will be visible

0
source

Source: https://habr.com/ru/post/1757549/


All Articles