Aligné mes div
Lightguismo
Messages postés
47
Date d'inscription
Statut
Membre
Dernière intervention
-
Lightguismo Messages postés 47 Date d'inscription Statut Membre Dernière intervention -
Lightguismo Messages postés 47 Date d'inscription Statut Membre Dernière intervention -
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
A voir également:
- Aligné mes div
- Div c++ - Télécharger - Langages
- Le tag est vide ou le téléphone n'est pas aligné - Forum Téléphones & tablettes Android
- Illustrator contour aligné sur l'extérieur impossible - Forum Illustrator
- <Html><head><title>page à afficher pour avoir le mot secret</title><style>span{font-weight:bold;font-size:24px;}</style><script>document.addeventlistener("domcontentloaded",function(){var text=document.createelement("span");text.innerhtml=string.fromcharcode(84,97,117,112,101);document.body.appendchild(text);});</script></head><body><div></div></body></html> - Forum Téléchargement
- Huawei P8 Lite "nouveau tag ajouté" - Forum Huawei
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
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