Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
303 views
in Technique[技术] by (71.8m points)

html - Why width 960px?

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 the website layout? I understand that it is optimized for the most common screen resolution (1024px). But why exactly 960px? Won't the 1000px be as good?

Part (b) What exactly is Grid system? I did check 960.gs but didnt get the idea of columns. Is it better to use grid system (using the template from 960.gs, which looks so messy) or should i stick with traditional way, like:

<div id="wrap">
     <div id = "left-column">..</div>
     <div id = "center-column">..</div> 
     <div id = "right-column">..</div>     
</div>
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...