Ir para conteúdo

POWERED BY:

Arquivado

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

AMON-HÁ

[Resolvido] 3px Internet Explorer

Recommended Posts

No Firefox não tem nenhum problema, mas no IE é acrescentado 3px abaixo da primeira camada...

Coloquei o excedente em vermelho para diferenciar...

 

<!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>
<title>EXEMPLO</title>
<style>
#camada_1 {
	background:#F00;
	width:600px;
	height:100px;
}
#camada_2 {
	background:#666;
	width:600px;
	height:300px;	
}
</style>
</head>

<body>
<div id="camada_1">
  <img src="topo.jpg" width="600" height="100" border="0" />
</div>
<div id="camada_2"></div>
</body>
</html>

Imagem Postada

Compartilhar este post


Link para o post
Compartilhar em outros sites

Sempre comece com um CSS reset:

<style type="text/css">
* {
	margin: 0;
	padding: 0;
}
#camada_1 {
	background:#F00;
	width:600px;
	height:100px;
}
#camada_2 {
	background:#666;
	width:600px;
	height:300px;	
}
</style>

Compartilhar este post


Link para o post
Compartilhar em outros sites

Deixa toda a estilização no css.

<div id="camada_1">
  <img src="topo.jpg" alt="" />
</div>
Se precisar aplicar nenhuma borda, faz um border: none, no css tb.

Compartilhar este post


Link para o post
Compartilhar em outros sites

Também não funcionou não... Tirei todos os atributos...

 

<!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>
<title>EXEMPLO</title>
<style>
#camada_1 {
	background:#F00;
	width:600px;
	height:100px;
}
#camada_2 {
	background:#666;
	width:600px;
	height:300px;	
}
</style>
</head>

<body>
<div id="camada_1">
  <img src="topo.jpg" />
</div>
<div id="camada_2"></div>
</body>
</html>

Compartilhar este post


Link para o post
Compartilhar em outros sites

Estranho.. essa tua imagem tem 100px de height mesmo?

Posta ela ai.

Compartilhar este post


Link para o post
Compartilhar em outros sites

Nossa.. não achei de onde tá vindo isso..

mas o overflow resolve.

#camada_1 {
	background-color: #f00;
	width: 600px;
	overflow: hidden;
	height: 100px;
}

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.