Why width 960px?

前端 未结 7 654
情深已故
情深已故 2020-12-07 13:42

I have a question regarding fixed layout. It has two parts, closely related, so I\'m putting in one question.

Part (a) Why 960px is suggested for th

7条回答
  •  天命终不由人
    2020-12-07 14:31

    1024px is the max screen width it's aiming at. We need to allow some window chrome, so it needs to be less. We'd ideally like it to have lots of factors, allowing us to split it into equal size columns with integer widths.

    960 has lots of factors:

    echo factors(960);
    1  2  3  4  5  6  8  10  12  15  16  20  24  30  32  40  48  60  64  80  96  120  160  192  240  320  480  960 
    

    1000 doesn't have as many

    echo factors(1000);
    1  2  4  5  8  10  20  25  40  50  100  125  200  250  500  1000  
    

    Specifically, you can easily split 960 into 2,3,4,5,6 and 8 columns.

提交回复
热议问题