960gs 和页边距背景

发布于 2024-09-09 03:10:07 字数 161 浏览 2 评论 0原文

我正在使用 960gs 开发一个网站,但遇到了一些麻烦。我想在我的列之间显示一个小(斜角)边框。一种方法(我现在正在使用)是为主容器提供背景图像,但这意味着我必须手动为 2、3 或更多列制作图像。我宁愿为列本身设置背景,但这意味着我必须去掉边距。处理这个问题最巧妙的方法是什么?

谢谢, J。

I'm developing a site using 960gs and I'm running into some troubles. I want to display a small (beveled) border between my columns. One way (i'm using now) is to give the main container a background-image, but this means I have to manually make images for 2, 3 or more columns. I rather set a background to the columns themselves, but this would mean that I have to get rid of the margin. What would be the neatest approach to handle this?

Thanks,
J.

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

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

发布评论

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

评论(2

一抹微笑 2024-09-16 03:10:07

转到 960.gs 站点并单击“生成 css”。然后,您可以在那里编辑列宽,并使列稍微小一些,以适应两侧的斜角宽度

go to the 960.gs site and click generate css. u can then edit the column width there and make the columns a little smaller to accommodate the bevel width on both sides

纸短情长 2024-09-16 03:10:07

是的,尽可能避免使用图像,特别是对于这样的事情。例如,如果您有 3 列,每列 300 像素,它们之间的边距为 30 像素:

column 1 - 300px wide

column 2 - 300px wide, margin:0 30px (left and right = 30)

column 3 - 300px wide

只需稍微更改规则并为中心列提供边框,例如,

column2 {border-left:1px dashed #ccc; border-right:1px dashed #ccc; margin:0 29px;}

通过将边距减少 1 像素,您可以为现在占用的空间腾出空间边界

Yes, avoid using images whenever possible, specially for things like this. If for example, you have 3 columns, 300px each, 30px of margin between them:

column 1 - 300px wide

column 2 - 300px wide, margin:0 30px (left and right = 30)

column 3 - 300px wide

Just change the rules a bit and give that central column the borders, for example

column2 {border-left:1px dashed #ccc; border-right:1px dashed #ccc; margin:0 29px;}

By reducing the margin by 1 px you make space for the space now taken up by the borders

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