CSS 框架(即:960gs 或 Blueprintcss)可以在没有边距的情况下使用吗?

发布于 2024-07-21 02:52:39 字数 385 浏览 4 评论 0 原文

我不明白使用 http://960.gshttp://blueprintcss.org 如果他们强制执行除漂亮杂志布局/marketing-esq 小册子之外的边距。 有没有一种方法可以使用它们来满足某些设计要求,例如可以实际触摸/环绕标题的导航栏? 任何使用这些框架而无需边距的输入(因为它们对 CSS 大师级别较低的开发人员强制执行浏览器兼容性)都是理想的。(注意:我们正在使用 JSF,这也是一个开发商店,而不是一个 Web完全购物)

I don't see the point of using either http://960.gs or http://blueprintcss.org if they enforce margins other than for pretty magazine layouts/marketing-esq brochures. Is there a way I can use these to meet certain design requirements such as a navbar that can actually touch/wrap-around to the header? Any input to use these frameworks without margins (as they enforce browser compatability onto the less CSS guru level developers) would be ideal. (Note: we are using JSF, this is also a development shop not a web shop at all)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

谷夏 2024-07-28 02:52:39

我使用这种技术作为我的终极 CSS 布局技术:

http://www.codeofficer.com/ blog/entry/css_grid_frameworks_960gs_without_margins/

我曾经遇到过同样的问题,自从我使用这个问题以来,所有边距问题都消失了。
当我需要使用自定义宽度/高度时,我使用 !important 覆盖。

代码:

<div class="g_9 content_main">
    This div should actually have 720px in width.
    But I overide it using another class so now the width has become 700px,
    and just in case it needs custom margin, we can always set it in the css :)
</div>

CSS:

.c_12 .g_9, .c_16 .g_12 { width: 720px; } /* 960-full.css */
.content_main { width: 700px !important; margin-left: 15px;} /* style.css */

I use this technique as my ultimate CSS layout technique:

http://www.codeofficer.com/blog/entry/css_grid_frameworks_960gs_without_margins/

I had the same issue once, and since I use that one, all the margin headaches has dissapear.
I use !important overide when I need to use custom width/height.

The Code:

<div class="g_9 content_main">
    This div should actually have 720px in width.
    But I overide it using another class so now the width has become 700px,
    and just in case it needs custom margin, we can always set it in the css :)
</div>

The CSS:

.c_12 .g_9, .c_16 .g_12 { width: 720px; } /* 960-full.css */
.content_main { width: 700px !important; margin-left: 15px;} /* style.css */
还不是爱你 2024-07-28 02:52:39

您不必为站点上的每个 div 使用网格类。 如果您的标题不需要遵循网格布局,则为标题创建您自己的样式。 您也可以完全跳过网格,只使用表单 & 排版标记。 这些框架试图为您的项目带来一些一致性。

我使用蓝图作为主要内容,但标题区域有自己的自定义布局。

You don't have to use the grid classes for every div on your site. If you're header doesn't need to follow the grid layout then create your own styles for the header. You can also skip the grid completely and just use the form & typography markups. The frameworks are an attempt to bring a bit of consistency to your projects.

I'm using blueprint for the main content but the header area has it's own custom layout.

嘦怹 2024-07-28 02:52:39

这是我编写的一个 mod,它可以与 960gs 配合使用,帮助您创建触摸元素,而无需重写框架。

http://www.michaelhartmayer.com/css/960gs-margin-mod

Here's a mod I wrote that works with the 960gs to help you create elements that touch, without rewriting the framework.

http://www.michaelhartmayer.com/css/960gs-margin-mod

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文