English 中文(简体)
• 如何把四舍五入到母窗上去?
原标题:How to place div so that it sizes with parent window?
  • 时间:2011-06-28 00:36:06
  •  标签:
  • html
  • css

我试图把一个网站放在一起,在所有网页上有一个“毗连”区,以便我能够有一个所有其他网页的模板。 我已经设立这一机制,但新编织的护堤将适当转至主窗户,在把窗户减少到最低限度之前,它们会与它进行善后。 我正试图说出菜单和行动 d。

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
 "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Centered Scalable Layout using &lt;div&gt; s</title>
<style type="text/css">
html {
    height: 100%;
}
body {
    margin: 0;
    height: 100%;
    background: #999999;
}
#wrapper {
    position: relative;
    width: 95%;
    margin: 0 auto 0 auto;
    min-height: 100%;
    background: #FBFBFF;
    color: #000033;
}
#header {
    height: 6em;
    background: #000059;
    color: #F2F2FF;
}
#content {
    width:100%;
    height:900px;
    position:relative;
}
#action{
    position:absolute;
    top: 500px;
    left: 25%;
    height: 300px;
    width: 600px;
    border: 5px solid #000;
}
#menu{
    position:absolute;
    left: 25px;
    height: 15px;
    width: 500px;
}
#footer {
    position: absolute;
    bottom: 0;
    height: 4em;
    width: 100%;
    background: #80A7E0;
    color: #000033;
}

</style>
<!--[if IE 6]>
<style type="text/css">
#wrapper {
height: 100%;
}
</style>
<![endif]-->
</head>
<body>
<div id="wrapper">
  <div id="header"> Header area</div>
  <div id="content"> 
    <p>Some text in the content area.  </p>

    <div id="menu"> menu area</div>
    <div id="action">action area</div>
  </div>
  <!--end content div -->

  <div id="footer">Footer area</div>
</div><!--end wrapper -->
</body>
</html>
问题回答




相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签