Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

brunoqueiros

[Resolvido] Problema com include em PHP no IE

Recommended Posts

Estou com uma dúvida, se eu crio um único arquivo HTML, o CSS funciona no IE, mas se eu separar ele em "header.php", "index.php" e "footer.php", não esta puxando o estilo, queria saber se é algum bug do IE. Era para alinhar a DIV. Nos outros navegadores funciona normal.

 

header.php

<!DOCTYPE html>
<html lang="pt-br">
<head>
<!-- Meta -->
<meta charset="UTF-8" />
   <meta name="robots" content="robots.txt" /> 
<meta name="title" content="Título do site" />
<meta name="description" content="Descrição do site" />
<meta name="author" content="Autor do site" />

<!-- Title -->
<title>Título Site</title>

<!-- CSS -->
<link rel="stylesheet" href="style.css" media="screen" />

<!-- Favicon -->
<link rel="shortcut icon" href="favicon.ico" />
</head>
<body>
<div id="wrap">
	<header>
		<nav>

		</nav><!-- /nav --> 
	</header><!-- /header -->

index.php

<?php include("header.php"); ?>
	<div id="content">
		<div id="boxUm">

		</div>
		<div id="boxDois">

		</div>
	</div><!-- /#content --> 
<?php include("footer.php"); ?>

footer.php

	<footer>

	</footer><!-- /footer -->
</div><!-- /#wrap --> 

<!--GOOGLE ANALYTICS-->

<!-- Scripts -->
</body>
</html>

style.css

/*   
Theme Name: 
Theme URI: 
Description: 
Author: 
Author URI: 
Version: 
*/

/*
+----------------------------------------------------------------+
Reset CSS for HTML5					
+----------------------------------------------------------------+
*/
html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small,  strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
vertical-align: baseline;
}
ul, ol {list-style:none}
section, article, aside, header, footer, nav, dialog, figure {display:block;}


/*
+----------------------------------------------------------------+
CSS3 Font-face												
+----------------------------------------------------------------+
*/
@font-face {

}


/*
+----------------------------------------------------------------+
Definicoes Gerais												
+----------------------------------------------------------------+
*/
body{

}

#wrap{
width:960px;
margin:0 auto;
}

.clear {
clear:both;
}


/*
+----------------------------------------------------------------+
Header												
+----------------------------------------------------------------+
*/


/*
+----------------------------------------------------------------+
Content												
+----------------------------------------------------------------+
*/
#boxUm{
width:200px;
height:400px;
background:#eadead;
float:left;
}

#boxDois{
width:200px;
height:400px;
background:#e111ad;
float:right;
}

/*
+----------------------------------------------------------------+
Post											
+----------------------------------------------------------------+
*/


/*
+----------------------------------------------------------------+
Footer												
+----------------------------------------------------------------+
*/


/*
+----------------------------------------------------------------+
Extras												
+----------------------------------------------------------------+
*/

Compartilhar este post


Link para o post
Compartilhar em outros sites

não, isso não é um bug do ie, é um bug seu.

 

não tem como ser nada com o navegador.

 

Exibir > Codigo Fonte

 

e analise o HTML gerado.

Compartilhar este post


Link para o post
Compartilhar em outros sites

Cara ele esta gerando este código.

 

?<!DOCTYPE html>
<html lang="pt-br">
<head>
<!-- Meta -->
<meta charset="UTF-8" />
<meta name="robots" content="robots.txt" /> 
<meta name="title" content="Título do site" />
<meta name="description" content="Descrição do site" />
<meta name="author" content="Autor do site" />

<!-- Title -->
<title>Título Site</title>

<!-- CSS -->
<link rel="stylesheet" href="style.css" media="screen" />

<!-- Favicon -->
<link rel="shortcut icon" href="favicon.ico" />
</head>
<body>
<div id="wrap">
	<header>
		<nav>

		</nav><!-- nav --> 
	</header><!-- header -->		<div id="content">
		<div id="boxUm">

		</div>
		<div id="boxDois">

		</div>
	</div><!-- #content --> 
?		<footer>

	</footer><!-- footer -->
</div><!-- #wrap --> 

<!--GOOGLE ANALYTICS-->

<!-- Scripts -->
</body>
</html>

 

IE

bezn2x.jpg

 

Chrome

23ksvw9.jpg

Compartilhar este post


Link para o post
Compartilhar em outros sites

notou os lixos ali?

 

?<!DOCTYPE html>

 

?               <footer>

 

vou falar de novo, o problema é teu código, e não o navegador.

O ie só evidenciou um erro seu.

 

http://wbruno.com.br/blog/2011/08/05/devemos-saber-desenvolver-para-internet-explorer-ie/

 

 

valide a marcação e o css no w3c.

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.