Aligné mes div
Lightguismo
Messages postés
54
Statut
Membre
-
Lightguismo Messages postés 54 Statut Membre -
Lightguismo Messages postés 54 Statut Membre -
Bonjour, Voila mon problème, sur mon site : http://www.stargate-encyclopedie.c4.fr/test en bas dans la catégorie derniers fiches, je n'arrive pas à aligner mes div. Voici le code :
html :
<div id="fiches">
<div id="sg1">
<?php
include('config.php');
$retour = mysql_query('SELECT * FROM sg1 ORDER BY id DESC LIMIT 0, 6');
while ($donnees = mysql_fetch_array($retour))
{
echo'<a href="fiches_atlantis.php?n='.$donnees['id'].'">'.$donnees['titre'].'</a><br><br>';
}
?>
</div>
<div id="atlantis" style="float: left;">
<?php
include('config.php');
$retour = mysql_query('SELECT * FROM atlantis ORDER BY id DESC LIMIT 0, 6');
while ($donnees = mysql_fetch_array($retour))
{
echo'<a href="fiches_atlantis.php?n='.$donnees['id'].'">'.$donnees['titre'].'</a><br><br>';
}
?>
</div>
</div>
CSS :
#fiches
{
background: url(fiches.png) no-repeat;
height: 320px;
width: 867px;
margin-left: 30px;
}
#atlantis
{
width: 200px;
padding-left: 300px;
}
#atlantis a
{
text-decoration: none;
color: white;
}
#atlantis a:hover
{
text-decoration: none;
color: orange;
}
#sg1
{
width: 200px;
padding-left: 100px;
padding-top: 80px;
}
#sg1 a
{
text-decoration: none;
color: white;
}
#sg1 a:hover
{
text-decoration: none;
color: orange;
}
Voila, si quelqu'un pourrais m'aider svp
html :
<div id="fiches">
<div id="sg1">
<?php
include('config.php');
$retour = mysql_query('SELECT * FROM sg1 ORDER BY id DESC LIMIT 0, 6');
while ($donnees = mysql_fetch_array($retour))
{
echo'<a href="fiches_atlantis.php?n='.$donnees['id'].'">'.$donnees['titre'].'</a><br><br>';
}
?>
</div>
<div id="atlantis" style="float: left;">
<?php
include('config.php');
$retour = mysql_query('SELECT * FROM atlantis ORDER BY id DESC LIMIT 0, 6');
while ($donnees = mysql_fetch_array($retour))
{
echo'<a href="fiches_atlantis.php?n='.$donnees['id'].'">'.$donnees['titre'].'</a><br><br>';
}
?>
</div>
</div>
CSS :
#fiches
{
background: url(fiches.png) no-repeat;
height: 320px;
width: 867px;
margin-left: 30px;
}
#atlantis
{
width: 200px;
padding-left: 300px;
}
#atlantis a
{
text-decoration: none;
color: white;
}
#atlantis a:hover
{
text-decoration: none;
color: orange;
}
#sg1
{
width: 200px;
padding-left: 100px;
padding-top: 80px;
}
#sg1 a
{
text-decoration: none;
color: white;
}
#sg1 a:hover
{
text-decoration: none;
color: orange;
}
Voila, si quelqu'un pourrais m'aider svp
Configuration: Windows Vista Firefox 2.0.0.17
2 réponses
-
Bonjour,
on va utiliser un petit float:left là !!
Bon si je comprend bien c'est les div #sg1 et #altantis qui faut aligner ? Et bien tu peux rajouter FLOAT:LEFT dans le style de tes div... pense a bien gérer la largeur de la div #fiches
#sg1
{
width: 200px;
padding-left: 100px;
padding-top: 80px;
float:left;
}
#atlantis
{
width: 200px;
padding-left: 300px;
float:left;
}
Cdt,
OREL -
ça a juste pour effet de me mettre le texte de sg1 tout à droite float: left; ne fonctionne pas