开发者

css frame problem

开发者 https://www.devze.com 2023-01-13 23:26 出处:网络
i am trying to do a page like this - http://www.wickham43.supanet.com/tutorial/headerfooterfixexample.html

i am trying to do a page like this - http://www.wickham43.supanet.com/tutorial/headerfooterfixexample.html but i want just the bottom to stay. so i created this but this is not working. can you pls tell me why?

 <html>
<head>
    <title></title>
    <meta http-equiv="Content-Language" content="en" />
    <meta http-equiv="content-type" content="text/html;charset=utf-8" />
<style type="text/css" media="screen,print">
body,
html{
    margin:0;
    padding:0;
}
div#middlewrap {

    margin-left:16px;
    padding-bottom:50px;
}

/* no positioning for IE5/Win - the whole page scrolls */
div#footerwrap {
    width:100%;
    position:absolute;
    bottom:0;
    left:0;
    height:50px;
}
body>div#footerwrap {
    position:fixed;
}
div#footer {
    height:50px;
    width:1520px;
    margin:0 auto;
}

/* Styling rules to make this demo page look nice. */
body,
html{
    font-family:"Trebuchet MS", Georgia, Verdana, serif;
    color:#335500;
    background:#e9e9e2;
}
div#header,
div#footer {
    background:#de7008;
    color:#eee;
}
div #footer p {
    margin:0;
    padding:0;
    text-align:center;
}
div#footer a {
    color:#fff;
}

p {
    margin-bottom:0;
    font-size:0.8em;
    line-height:1.4em;
}
pre {
    font-size:0.9em;
    line-height:1.4em;
}

</style>
</head>

<body>
<div id="middlewrap">

gfhgfhgfh

 <br /><br /><br /><br /><br /><br /><br /><br /><br />
                    <br /><br /><br /><br /><br /><br /><br /><br /><br />
 gfdgfdgdf gfdgfdgdf gfdgfdgdf gfdgfdgdf gfdgfdgdf gfdgfdgdf gfdgfdgdf gfdgfdgdf gfdgfdgdf gfdgfdgdf <br /><br /><br /><b开发者_运维技巧r /><br /><br /><br /><br /><br />
  <br /><br /><br /><br /><br /><br /><br /><br /><br />
   <br /><br /><br /><br /><br /><br /><br /><br /><br />
    <br /><br /><br /><br /><br /><br /><br /><br /><br />
     <br /><br /><br /><br /><br /><br /><br /><br /><br />

</div>      
<div id="footerwrap">
    <div id="footer"></div>
</div>
</body>
</html>


Here you go.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en"> <!-- make it play nice in IE -->
<head>
    <title></title>
    <meta http-equiv="Content-Language" content="en" />
    <meta http-equiv="content-type" content="text/html;charset=utf-8" />
<style type="text/css" media="screen,print">
body,
html{
    margin:0;
    position: relative;
    padding:0;
}
div#middlewrap {
    margin-left:16px;
    padding-bottom:50px;
}

/* no positioning for IE5/Win - the whole page scrolls */
div#footerwrap {
    width:100%;
    position:absolute;
    bottom:0px;
    left:0px;
    height:50px;
}
body>div#footerwrap {
    position:fixed;
    bottom: 0px;
}
div#footer {
    height:50px;
    width:1520px;
    margin:0 auto;
}

/* Styling rules to make this demo page look nice. */
body,
html{
    font-family:"Trebuchet MS", Georgia, Verdana, serif;
    color:#335500;
    background:#e9e9e2;
}
div#header,
div#footer {
    background:#de7008;
    color:#eee;
}
div #footer p {
    margin:0;
    padding:0;
    text-align:center;
}
div#footer a {
    color:#fff;
}

p {
    margin-bottom:0;
    font-size:0.8em;
    line-height:1.4em;
}
pre {
    font-size:0.9em;
    line-height:1.4em;
}

</style>
</head>

<body>
<div id="middlewrap">

gfhgfhgfh

 <br /><br /><br /><br /><br /><br /><br /><br /><br />
                    <br /><br /><br /><br /><br /><br /><br /><br /><br />
 gfdgfdgdf gfdgfdgdf gfdgfdgdf gfdgfdgdf gfdgfdgdf gfdgfdgdf gfdgfdgdf gfdgfdgdf gfdgfdgdf gfdgfdgdf <br /><br /><br /><br /><br /><br /><br /><br /><br />
  <br /><br /><br /><br /><br /><br /><br /><br /><br />
   <br /><br /><br /><br /><br /><br /><br /><br /><br />
    <br /><br /><br /><br /><br /><br /><br /><br /><br />
     <br /><br /><br /><br /><br /><br /><br /><br /><br />

</div>      
<div id="footerwrap">
    <div id="footer"></div>
</div>
</body>
</html>
0

精彩评论

暂无评论...
验证码 换一张
取 消