这是我的 html 代码,我很难将电子邮件放在页面底部。那么无论屏幕大小如何,我如何将页脚文本居中在页面底部
<body>
<div class = 'container' >
<header> ****** Illustration</header>
</div>
<!-- Sign and date the page, it's only polite! -->
<footer> <a href="mailto:*******@cmail.carleton.ca">
*******@cmail.carleton.ca</a></footer>
</body>
这是我的css代码,我尝试将页脚居中放在页面的中心底部,但是每次我使用不同的屏幕尺寸时,文本的位置都会改变,我该如何避免这个问题?
<!--[if lt IE 9]>
<script src="dist/html5shiv.js"></script>
<![endif]-->
.container {
width : 900px;
margin : 0 auto;
}
body {
background : url('images/black_background.jpg');
width: 100%;
height: 100%;
possition: absolute;
top: 0;
left: 0:
z-index: -5000;
overflow-x:hidden
}
header{
min-width: 900px;
height: 90px;
background: url('images/header.jpg') 0 0 no-repeat;
padding: 20px 0 0 0;
color: white;
position: relative;
right: -85x;
color: white;
font-size: 3em;
font-family: Lucida Handwriting;
}
nav{
width: 900px;
height: 40px;
margin: 0 auto;
color: white;
background: url();
position: relative;
right: 250px;
top: -40px;
height: 90px;
min-width: 900px;
}
/*#content{
width: 900px;
height: 650px;
position: relative;
left: -45px;
background:url('images/himba_tribes.jpg');
}
*/
footer{
position:absolute;
bottom:-40;
width:100%;
height:60px; /* Height of the footer */
background:#6cf;
border: 4px solid orange;
clear: both;
}