960 个网格,两侧有重复图案

发布于 2024-11-19 06:28:56 字数 2140 浏览 2 评论 0原文

我快要疯了。我正在使用 960 网格系统创建一个网站,到目前为止一切正常 - 我确实理解它。我唯一的问题是,由于框架本身仅限于 960 像素,我不明白如何使网站自动适应各种屏幕分辨率。我的意思是这样的:我创建了一个网站,其两侧都有重复的图案,因此我希望左侧和右侧的图案能够重复自身,而不是使其以 960 像素结束。我在网站的三个不同部分有三种不同的模式。 示例网站为:

http://www.assistly.com/
http://secondandpark.com/

这是一个非常基本的问题,我尝试用 div 解决它,但找不到一个解决方案。

<html>
<head>
<title>Prototype</title>
<link rel="stylesheet" type="text/css" media="all" href="css/reset.css" />
<link rel="stylesheet" type="text/css" media="all" href="css/text.css" />
<link rel="stylesheet" type="text/css" media="all" href="css/960_24_col.css" />
<link rel="stylesheet" type="text/css" media="all" href="css/demo.css" />
</head>
<body>

<div class="container_24">
<div id="header">
<div class="grid_1"></div>
<div class="grid_22">
<img src="images/main_header.jpg"></div>
<div class="grid_1 alpha"></div>
</div>   
<!-- End of Main Header -->
<div class="clear"></div>
<div class="grid_1">
</div>
 <div class="grid_22">
<img src="images/divider.jpg">
  </div>
<div class="grid_1">
</div>   
<!-- End of Divider -->
<div class="clear"></div>
<div class="grid_1">
</div>   
<div class="grid_2">
<img src="images/left_shadow.jpg">
</div>
<div class="grid_18">
</div>
<div class="grid_2">
<img src="images/right_shadow.jpg">
</div>   
<div class="grid_1">
</div>   
<!-- End of left right shadow -->
<div class="clear"></div>
<div class="grid_2 alpha">
</div>
 <div class="grid_20">
<img src="images/bottom.jpg">
  </div>
<div class="grid_2 omega">
</div>   
<!-- End of Bottom -->

<div class="clear"></div>
</div>
<!-- End of Container -->

</body>
</html>

请注意,我对标题和分隔符使用不同的模式。

感谢您的帮助。

约翰

I am going crazy. I am creating a website with the 960 grid system and so far everything works fine - I do understand it. My only issue is the following, since the framework as itself is limited to 960 pixels, I do not understand how to make the website automatically fit to the various screen resolutions. Here is what I mean: I created a website that has repeating patterns to both of its sides, so instead of having it end at 960 pixels I would like the pattern on the left and the right side to repeat itself. I have three different patterns at three different parts of the website.
Example websites are:

http://www.assistly.com/
http://secondandpark.com/

It is a very basic problem and I tried to solve it with divs but could not find a solution.

<html>
<head>
<title>Prototype</title>
<link rel="stylesheet" type="text/css" media="all" href="css/reset.css" />
<link rel="stylesheet" type="text/css" media="all" href="css/text.css" />
<link rel="stylesheet" type="text/css" media="all" href="css/960_24_col.css" />
<link rel="stylesheet" type="text/css" media="all" href="css/demo.css" />
</head>
<body>

<div class="container_24">
<div id="header">
<div class="grid_1"></div>
<div class="grid_22">
<img src="images/main_header.jpg"></div>
<div class="grid_1 alpha"></div>
</div>   
<!-- End of Main Header -->
<div class="clear"></div>
<div class="grid_1">
</div>
 <div class="grid_22">
<img src="images/divider.jpg">
  </div>
<div class="grid_1">
</div>   
<!-- End of Divider -->
<div class="clear"></div>
<div class="grid_1">
</div>   
<div class="grid_2">
<img src="images/left_shadow.jpg">
</div>
<div class="grid_18">
</div>
<div class="grid_2">
<img src="images/right_shadow.jpg">
</div>   
<div class="grid_1">
</div>   
<!-- End of left right shadow -->
<div class="clear"></div>
<div class="grid_2 alpha">
</div>
 <div class="grid_20">
<img src="images/bottom.jpg">
  </div>
<div class="grid_2 omega">
</div>   
<!-- End of Bottom -->

<div class="clear"></div>
</div>
<!-- End of Container -->

</body>
</html>

Note that I use different patterns for the header and the divider.

Thanks for your help.

John

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

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

发布评论

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

评论(1

七堇年 2024-11-26 06:28:56

我把我的标题 ID 放在 960 网格之外

<div id="header"> 

<div class="container_12"> 

    <div class="grid_2"><img src="#" alt="#"></div> 
    <div class="grid_10"><p class="subtitle">#</p></div> 

    <div class="clear"></div> 
</div> 
</div> 

,然后放在你的 CSS 中

#header {
background: #686868 url(../images/bg_header.jpg); }

所以我的标题 ID 是全宽的,网格在里面

I put my header id outside the 960 grid

<div id="header"> 

<div class="container_12"> 

    <div class="grid_2"><img src="#" alt="#"></div> 
    <div class="grid_10"><p class="subtitle">#</p></div> 

    <div class="clear"></div> 
</div> 
</div> 

then in your CSS

#header {
background: #686868 url(../images/bg_header.jpg); }

So my header ID is full width, and the grid is inside that

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