0

这真让我抓狂!我需要有关此 CSS 代码的帮助,请。我过去使用过 HTML,但我需要使用 CSS 进行布局,而我以前从未使用过它。我现在的问题是顶部标题不会与下部图像对齐。我可以改变边距,一切都会移动!如果我改变图片的大小,它仍然不会对齐。此外,当我调整浏览器的大小时,背景会随之移动,我需要将其固定,以便“表格”保持在它的中间。你能帮忙吗?

CSS:

html {
margin: 0;
padding: 0;
}

body {
font-family:Arial, Helvetica, sans-serif;
line-height:18px;
font-size:12px;
color: #06185c;
background: #ffffff url(crysbg.png) no-repeat top center fixed;
margin: 0;
padding: 0;
position: absolute;

}

p {
margin: 10px;
padding: 0;
}

h1, h2, h3 {
display:none;
}
.page-wrapper {
margin: auto;
width:auto;
background:url(topbanner.png) no-repeat top center;
position:absolute;
margin-left: 318px;
margin-right: auto;
}

HTML:

<body id="crystal-self-acceptance">
<div class="page-wrapper">

问题图片:

http://i.imgur.com/eI8Cmns.jpg 定位问题。

i.imgur.com/3EUEYnr.jpg 调整窗口大小时,中心区域会远离背景。(这包括宽屏幕,只是没有屏幕截图)。

请问有什么帮助吗?

编辑添加 jsFiddle:http: //jsfiddle.net/Q3y36/8/

4

0 回答 0