How can I make the width of a dynamic page to a certain limit?

For example, dynamic and liquid between 600px - 1000px, but fixed at 1000px after 1000px and fixed at 600px below 600px. Take a look at digg.com for an example. I need a cross browser compatible method. Thank!

+3
source share
3 answers

here is the code that I used in elastic width with the limits site to make it obey - even on ie6 (width: there is an expression string for ie6):

min-width: 900px;
 max-width: 1280px;
 text-align: left;
 width:expression(document.body.clientWidth < 990? "990px": "auto" );
+2
source

Use min-widthand max-widthCSS Properties.

body {
  min-width: 600px;
  max-width: 1000px;
}

IE6 , (IE7 +). .

+5

CSS - ! . , :

.style { min-height: 600px; max-height: 1000px; }
0
source

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


All Articles