这是我的标题:
<head>
<link href="/css/header.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="background"><img src="/multi/background.jpg" width="100%" height="100%" alt=""></div>
<div id="content">
<div align="center" class="headtable">
<table width="980" border="0" height="40">
<tr>
<td width="503" rowspan="2" height="35" align="left" valign="middle"><a href="/index.php"><img src="/multi/header.png" width="344" height="32" hspace="0" border="0"/></a></td>
<td width="424" align="right" valign="top">
<a href="/index.php" class="headlink">Italiano</a>
<span class="headlink">|</span>
<a href="/ger/index.php" class="headlink">Deutsch</a>
<span class="headlink">|</span>
<a href="/fra/index.php" class="headlink">Français</a>
<span class="headlink">|</span>
<a href="/index.php" class="headlink">Home</a>
<span class="headlink">|</span>
<a href="#" onClick="window.print();" class="headlink">Stampa Pagina</a>
</tr>
</table>
</div>
<div class="buttontable">
<table width="1080" border="0" cellpadding="0" align="center">
<tr>
<td height="20" align="center">
<a class="button" href="/o.php">o</a>
<a class="button" href="/p.php">p</a>
<a class="button" href="/a.php">a</a>
<a class="button" href="/s.php">s</a>
<a class="button" href="/st.php">st</a>
<a class="button" href="/p.php">p</a>
<a class="button" href="/t.php">t</a>
<a class="button" href="/c.php">c</a>
</td>
</tr>
</table>
</div>
</div>
</body>
和css文件:
/* pushes the page to the full capacity of the viewing area */
html {
height:100%;
}
body {
height:100%;
margin:0;
padding:0;
}
/* prepares the background image to full capacity of the viewing area */
#background {
position:fixed;
top:0;
left:0;
width:100%;
height:100%;
}
/* places the content ontop of the background image */
#content {
position:relative; z-index:1;
}
/* not apply if IE6 or lower */
* html {
background-color: #6f6;
}
* body {
height:100%;
margin:0;
padding:0;
}
* #background {
position:fixed;
top:0;
left:0;
width:100%;
height:100%;
}
* #content {
position:relative; z-index:1;
}
/* END not apply if IE6 or lower */
.headtable {
background-color:#02346F;
}
.headlink {
font-family:Arial, Helvetica, sans-serif;
font-size:12px;
text-decoration:none;
color:#d8dfea;
}
.buttontable {
background-color:#F00;
}
a.button {
display:inline-block;
color:#FFF;
font-family:Calibri;
font-size:18px;
font-weight:bold;
padding:2px 16px;
text-decoration:none;
font-variant:small-caps;
}a.button:hover {
background-color:#F00;
color:#02346F;
padding:2px 16px;
font-size:18px;
font-weight:bolder;
}
a.buttonselect {
background-color:#ffffff;
display:inline-block;
color:#02346F;
font-family:Calibri;
font-size:18px;
font-weight:bold;
padding:2px 16px;
text-decoration:none;
font-variant:small-caps;
}
现在,当窗口大小比页面(header.php)窄时,表格正在成为背景(我不知道你是否理解我的意思,但我无法解释......)
我得到的第一个解决方案是将 CSS 中的正文宽度大小设置为例如 1000 像素,但随后我将所有页面都对齐了。
我怎么解决这个问题?问题不是来自背景图像,因为我在没有背景的情况下也测试了所有...