标题<div>缩小窗口调整大小</div>

时间:2011-11-03 21:22:24

标签: html

我有一个标题,我需要填充屏幕的顶部。它成功地做到了这一点,但是当我最小化窗口然后向右滚动时,div缩小并且不再填充整个屏幕顶部。我尝试设置div高度并使用宽度:100%,但似乎没有任何效果。我正在寻找遇到同样问题的其他用户,但我无法工作。

Here is my code
<style>
A:hover {text-decoration: underline; color: white}
#top {
height:53px; width:100%; min-width: 800px;
background:#000000;
}
h400 {
color:white; border-bottom;
letter-spacing:-0.05em;
margin-top:0; padding-top:0; 
font-size:1.2em;
font-family:Helvetica, Arial, sans-serif;
}
#headerimage{
margin-top:-20px;
margin-right:10px;
min-width:322px;
background:black;
}
a img {border: none; }
</style>
<?php
if ($username){
$headerdiv='<div class="box" style="width:516px; margin-top:-16px;"><div   align="right">';
}
else
$headerdiv='<div class="box" style="width:220px; margin-top:-16px; margin-right:20px;">    <div align="left">';
?>
<head>
<div id="top" align='center'>
<h400><table><tr><td><div id='headerimage'><a href="http://www.pearlsquirrel.com" ><img    src="pearlsquirrel.jpg"/></a></div></td><td><div style="margin-top:13px; margin-   right:30px;"><form action='searchmusic.php' method='GET'>
<div style="margin-right:-5px;"><input type='text' size='45' name='search'   value="Search..." style="color:#474747;"   onfocus="if(this.value==this.defaultValue)this.value='';"   onblur="if(this.value=='')this.value=this.defaultValue;"/>
<div style="visibility:hidden;" >
<input type='submit' name='submit' value='Search' />
</div></div>
</form></div></td><td><?php echo $headerdiv; ?><?php if (!$username) echo '<a    href="register.php" style="color:white;">Register</a>'; ?> <?php if ($username) echo '<a   href="upload.php" style="color:white;">Upload</a>'; ?><h11> <?php echo $echovar?><?php if   ($username) echo '<a href=/profile.php?u='.$username.' style="color:white;">Page</a> | <a   href="logout.php" style="color:white;">Logout</a>'; ?></h11></div></div></td></tr></table>
<link rel="icon" href=".pearlsquirrelthumbnail.jpg" type="image/x-icon" />
<link rel="shortcut icon" href="pearlsquirrelthumbnail.jpg" type="image/x-icon" />  
</h400><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="styles.css" type="text/css" media="all" />
 </div>
 </head>

如果有人能帮我解决这个问题,我们将不胜感激。我觉得这很容易解决,但我真的不知道该怎么做。

0 个答案:

没有答案