Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Olá,
esta acontecendo algo estranho e não faço ideia porque
criei 2 divs e para estilizar em vez de usar id ou class eu selecionei elas com NTH-CHILD(numero da div)
e funciona so que quando eu dou um espaçamento entre uma e outra com <br>
ou <hr> ou qualquer conteúdo
uma das divs some.
alguém sabe me dizer o porque?
**com <br>:**
<?php
include("conexao.php");
?>
<!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" />
<title>Limita texto</title>
<style>
body{
width:1024px;
margin:0 auto;
margin-top:5px;
}
body div:nth-child(1){
padding:3px;
height:300px;
width:500px;
border:solid #000 1px;
background:#666;
}
body div:nth-child(2){
padding:3px;
min-height:200px;
width:500px;
border:solid #000 1px;
background:#999;
}
</style>
</head>
<body>
<div>
</div>
<br>
<div>
</div>
</body>
</html>
**e sem <br>:**
<?php
include("conexao.php");
?>
<!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" />
<title>Limita texto</title>
<style>
body{
width:1024px;
margin:0 auto;
margin-top:5px;
}
body div:nth-child(1){
padding:3px;
height:300px;
width:500px;
border:solid #000 1px;
background:#666;
}
body div:nth-child(2){
padding:3px;
min-height:200px;
width:500px;
border:solid #000 1px;
background:#999;
}
</style>
</head>
<body>
<div>
</div>
<div>
</div>
</body>
</html>Carregando comentários...