我有一个绝对的标题 div,所以我想让它成为静态的,但如果我这样做,里面的内容开始改变调整 window 的位置。我可以做些什么来获得一个不会在窗口调整大小时移动内容的静态标题?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<head>
<title>Client </title>
<style type="text/css">
.heading {position:fixed; visibility:show; width:100%; left: 0px; top: 0px; z-index:3;
border-bottom:5px solid #ccc; }
header{
position:absolute;
width: 100%;
height: 60px !important;
z-index:7;
top: 0px;
}
/*My div position*/
.positioning-container{position:relative;
width:1000px; margin:0 auto 0 auto;
black solid; padding:0px;
padding:60px 0 30px 0;
border-bottom:0px; padding:0px;
background:#eee;}
.inner-container{position:relative;
background:#fff; padding:0px;
padding:60px 0 30px 0; }
/*My div position*/
</style>
</head>
<body>
<div class="positioning-container">
<div class="inner-container" align = "center">
<header>
<div class= "heading" style="width:100% ; height:50px; background-color:#00A5C6">
<table id ="headertable" align="left"><tr><td>
<a href="index.php"><h2 class= "logo">Client Review</h2><td> </td></a></td><td>
<label>Search</label><input typ= "text"></td>
<td><a href="index.php" class="button middle">search</a></td>
<td><a href="login.php" class="button middle">Login</a></td>
<td><a href="register.php" class="button middle">Add Client</a></td>
<td><a href="logout.php" class="button middle">Logout</a></td>
<td align="left" class="profile"><img src="bhubezi/images/logos/nopic.png" width="50"
height="40"></td>
</tr>
</table>
</div>
</header>
<div class="content">
content
</div>
</div>
</div>