Ir para conteúdo

POWERED BY:

Arquivado

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

jacare87

Dentro da Div Nao esta alinhando

Recommended Posts

Eu fiz uma div "mae" para alinhar tudo que tem nela mas nao ta alinhando.

 

Olhe o codigo.

<!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>Untitled Document</title>
<style type="text/css">

#mae {
width:1000px;
margin:0 auto;
}

#topo {
position:absolute;
left:18px;
top:33px;
width:577px;
height:75px;
z-index:1;
background-color: #66FF66;
}
#menu {
position:absolute;
left:19px;
top:109px;
width:140px;
height:376px;
z-index:2;
background-color: #00CCFF;
}
#conteudo {
position:absolute;
left:161px;
top:109px;
width:322px;
height:377px;
z-index:3;
background-color: #99CC00;
}
#publicidade {
position:absolute;
left:482px;
top:107px;
width:113px;
height:381px;
z-index:4;
background-color: #006633;
}
</style>
</head>

<body>
<div id="mae">
<div id="topo"></div>
<div id="menu"></div>
<div id="conteudo"></div>
<div id="publicidade"></div>
</div>
</body>
</html>

 

 

 

Olhaa como fika

rap62v.jpg

Compartilhar este post


Link para o post
Compartilhar em outros sites

Coloque um background e um height, você verá que o problema é outro.

#mae {
  width:1000px;
  height: 1000px;
  margin:0 auto;
  background: #039;
}

 

 

Use float no lugar do position.

#menu {
  float: left;
  width:140px;
  height:376px;
  z-index:2;
  background-color: #00CCFF;
}

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.