probleme avec div et css

Eléphant du PHP | 74 Messages

26 nov. 2005, 13:50

bonjour,
j'ai une petite page qui au départ etait basée sur des tableaux
j'ai voulu remplacer tout ça par des <div>
mais voila j'ai un probleme d'alignement avec ma boite "contenu"

par ici
voici le contenu de mon body :
<div id="titre">
     <img src="./images/rouge/titre.png" width="750" height="130" alt="logo"/>
</div>
<div id="ligne"></div>

<div id="menu">
</div>
<div id="contenu"><p>blablabla</p></div>
et voici ma feuille de style :
body
{
	width: 754px;
	margin: auto;
	background-image: url(images/rouge/fond.png);
}

#menu a{
	font-size: 15px;
	font-family: verdana;
	color: #ffffff;
	font-weight: 600;
	text-decoration: none;
}

#titre
{
	height: 132px;
	background-color: #990100;
	border-color: #FFFFFF;
	border-style: dashed;
	border-width: 2px;
	border-bottom-width: 0px;
}
	
#menu
{
	width: 150px;
	height: 200px;
	background-color: #990100;
	border-color: #FFFFFF;
	border-style: dashed;
	border-width: 2px;
	border-top-width: 0px;
	border-right-width: 0px;
}

#ligne
{
	height: 10px;
	background-color: #FFFFFF;
	border-color: #FFFFFF;
	border-style: dashed;
	border-width: 2px;
	border-top-width: 0px;
	border-bottom-width: 0px;
}
	
#contenu
{
	margin-left: 152px;
	margin-bottom: 20px;
	width: 600px;
	height: 200px;
	background-color: #dddddd;
	border-color: #FFFFFF;
	border-style: dashed;
	border-width: 2px;
	border-top-width: 0px;
	border-left-width: 0px;
}
j'ai trouvé une solution mais elle me parait bizarre
c'est de mettre dans #contenu : margin-top: -220px;

est-ce la seule solution? :roll:
merci beaucoup pour votre aide :)

ViPHP
ViPHP | 649 Messages

27 nov. 2005, 00:19

T'as pas dit c'est quoi le problème à ma connaissance...
Image