【发布时间】:2013-03-24 21:47:55
【问题描述】:
我有一个想要完成的设计,并找到了两种使用 960gs 框架来实现它的方法。虽然我不知道哪一个更好,而且关于 CSS 最佳实践的信息也不如 PHP 那样多。所以我应用了从普通 HTML/CSS 和 PHP OO 中学到的东西,发现它们都不是真正“好”的。
这是我设计的[重要部分]:
基于960gs框架的两种获取方式以及我发现的缺点是:
修改 CSS 以向文本添加边距。然后,在那个 div 中,应用一个 12 列的纯 960gs 系统。这可行,但它使整个宽度比最佳宽度更宽(1000 像素,不适用于 1024x768,9% of browsers)。
使用 24 列模型并将第一列和最后一列留空,因此它们成为边距。这样做的问题是,我将结构元素纯粹用于视觉效果,而且必须将它们写在每个页面的每个部分(不是很干)。
第二个例子:
<div class='grid_22 prefix_1'>
<p>
The theory of relativity transformed theoretical <a href="http://en.wikipedia.org/wiki/Physics" title="Physics">physics</a> and <a href="http://en.wikipedia.org/wiki/Astronomy" title="Astronomy">astronomy</a> during the 20th century. When first published, relativity superseded a 200-year-old <a href="http://en.wikipedia.org/wiki/Classical_mechanics" title="Classical mechanics">theory of mechanics</a> created primarily by <a href="http://en.wikipedia.org/wiki/Isaac_Newton" title="Isaac Newton">Isaac Newton</a>.
</p>
</div>
我想要的是在我的页面中应用 960gs 框架,并带有一些额外的个性化边距。
那么,你将如何避免我所说的实现我想要的这些问题?
PS,由于960gs框架有bug,不好找
【问题讨论】:
标签: css frameworks dry 960.gs separation-of-concerns