Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/34.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
HTML文本与其他文本重叠_Html_Css - Fatal编程技术网

HTML文本与其他文本重叠

HTML文本与其他文本重叠,html,css,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=

我有下面的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>
最后,/var/www/other/foot.txt文件的内容是:

问题是,任何带有的文本都会覆盖文本中的任何内容

下面是一个例子:


联系人:Skype |电子邮件具有该属性,而Skype帐户仅在HTML中。

将位置更改为绝对

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

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

一个问题是嵌套无效:请稍后返回。。不要使用字体标签,它已经严重过时了。第二,没有结束div标记,因为这是一个客户端问题,PHP与此无关——除了它可能不生成您想要的HTML代码,或者代码无效之外。所以,首先去验证你的HTML输出。你为什么要用标签包装页脚?我假设CSS很难处理。@SamSullivan使其在文本文件中使用任何HTML第二,您使用的是position:fixed;对于页脚。我看不到你的页面,但这将使它脱离渲染上下文,它可能很容易与页面底部的任何其他内容重叠。它仍然可以,唯一的区别是,如果我上下滚动,它不会移动。尝试对两个文本使用position:absolute,以便它们位于不同的位置。
<div class="footer">
<font size="2">Contact:
<a href="skype:myskype">Skype</a> | <a href="mailto:myemail@gmail.com">Email</a></font>
</div>
    .footer { 
  text-align:center;
  position:absolute; 
  bottom: 5px; 
  font-family:verdana;
  padding: 0px;
} 

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