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
865 views
in Technique[技术] by (71.8m points)

layout - DIV's vs. Tables or CSS vs. Being Stupid

I know that tables are for tabular data, but it's so tempting to use them for layout. I can handle DIV's to get a three column layout, but when you got 4 nested DIV's, it get tricky.

Is there a tutorial/reference out there to persuade me to use DIV's for layout?

I want to use DIV's, but I refuse to spend an hour to position my DIV/SPAN where I want it.

@GaryF: Blueprint CSS has to be the CSS's best kept secret.

Great tool - Blueprint Grid CSS Generator.

See Question&Answers more detail:os

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

1 Reply

0 votes
by (71.8m points)

There's the Yahoo Grid CSS which can do all sorts of things.

But remember: CSS IS NOT A RELIGION. If you save hours by using tables instead of css, do so.

One of the corner cases I could never make my mind up about is forms. I'd love to do it in css, but it's just so much more complicated than tables.

You could even argue that forms are tables, in that they have headers (labels) and data (input fields).


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

...