HTML文本与其他文本重叠

时间:2014-02-13 20:05:24

标签: html css

我有以下HTML

<html>
<head>
<title>Title</title>
<link rel="shortcut icon" href="/other/fav.ico" />
<link rel="stylesheet" type="text/css" href="/other/style.css">
</head>
<body class="body">
<font size="6"><div align="center">Come back later.</font>
</body>
</html>

然后我在style.css中有了这个CSS:

.footer { 
  text-align:center;
  position:fixed; 
  bottom: 5px; 
  font-family:verdana;
  padding: 0px;
} 

.body {
  background-color:F2F2F2;
  font-family:verdana;
}

最后,/var/www/other/foot.txt文件的内容是:

<div class="footer">
<font size="2">Contact:
<a href="skype:myskype">Skype</a> | <a href="mailto:myemail@gmail.com">Email</a></font>
</div>

问题<div class="footer">的任何文字都会覆盖<body>中的任何内容。

以下是一个例子:

enter image description here

Contact: Skype | Email具有<div class="footer">属性,Skype Account就在HTML中。

1 个答案:

答案 0 :(得分:0)

将位置更改为绝对。

    .footer { 
  text-align:center;
  position:absolute; 
  bottom: 5px; 
  font-family:verdana;
  padding: 0px;
} 

.body {
  background-color:F2F2F2;
  font-family:verdana;
}
相关问题