2
When I use the require_once to include the top of the site, it leaves a top space at the top of approximately 8px, even in CSS I using body{ padding: 0; margin: 0; border: 0; }; the problem remains.
Follow my full CSS code:
body{
padding: 0;
margin: 0;
border: 0;
}
.guaraparivirtual-topo {
position:relative;
width:1215px;
height:110px;
background-image:url(http://guaraparivirtual.com.br/novo-gv/logo.png);
background-repeat:no-repeat;
background-position:1% 50%;
margin: 0 auto;
background-color:#D5D5D5;
}
Now follow the full HTML and with the require_once:
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="pt-br">
<meta name="description" content="Guarapari, Cidade Saude, guarapari es, espírito santo, fotos, verão, sol, mar, praias, tv, comidas tipicas, telefones úteis, horario de ônibus, turismo rural, empresas.">
<meta name="keywords" content="Brasil, Brazil, Guarapari, Cidade Saude, guarapari es, guarapari espírito santo, guarapari fotos, guarapari brasil, verão em guarapari">
<meta name="Author" content="Gladison Luciano Perosini" />
<meta name="reply-to" content="[email protected]" />
<meta name="robots" content="Follow" />
<title>:: Guarapari Virtual :: O Site da Cidade Saúde - Guarapari-ES</title>
<link href="guarapari-css.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="fonte.css">
</head>
<body>
<?php require_once('guarapari-topo-site-virtual.php'); ?>
</body>
</html>
It also follows the content of require_once:
<div class="guaraparivirtual-topo"></div>
All the files are there, but I couldn’t find the problem.
If I take the contents of the inclusion file and put right on the page it works neatly and without the top space, but and I use the inclusion file it gives this space.
Can you help me?
I await and thank you
have to put only the beginning of the page Uarapari-top-site-virtual.php ?
– João Victor Gomes Moreira
@Victorgomes better explain to me what I should do
– Gladison Neuza Perosini
Look just so there are no spaces for mistakes (even though I believe that is not the problem) eliminate the spaces, before
<link..> e </head> e <body>
– João Victor Gomes Moreira
@Victorgomes I did what guided me and it didn’t work
– Gladison Neuza Perosini
If I take the contents of the inclusion file and put right on the page it works neatly and without the top space, but and I use the inclusion file it gives this space.
– Gladison Neuza Perosini
See if the file condition is the same. Try to save everything encoded as
UTF-8 without BOM
– KaduAmaral
@Gladisonneuzaperosini mark an answer as correct or add more information.
– João Victor Gomes Moreira