Aligner 2divisions sou html

Résolu/Fermé
kristof85 Messages postés 1 Date d'inscription dimanche 27 mai 2012 Statut Membre Dernière intervention 27 mai 2012 - 27 mai 2012 à 18:15
mpmp93 Messages postés 6648 Date d'inscription mercredi 13 avril 2011 Statut Membre Dernière intervention 28 septembre 2015 - 27 mai 2012 à 21:11
Bonjour,
je voudrais savoir s'il est possible de mettre 2divisions html sur une même ligne.
je m'explique je voudrais qu'une division soit alignée sur la gauche avec une taille de police spécifique et l'autre division sur la même ligne mais alignée sur la droite avec une autre police spécifique.
donc j'ai déjà créé mes 2division (footer et copyright) avec leurs propriétés respectives mais il faudrait maintenant qu'elles soient sur la même ligne.
est-ce possible simplement parce que je ne suis qu'un novice
je vous laisse le code et le lien qui correspond pour plus de visuel
http://csefton.free.fr

Code

<div id="footer">
<ul>
<li>Powered by <a onclick="window.open(this.href); return false;" href="https://github.com/pixelpost/pixelpost/wiki" title="Pixelpost">Pixelpost</a></li>
<li>·</li>
<li>Theme by <a onclick="window.open(this.href); return false;" href="https://theworldin35mm.org/">The World in 35mm</a></li>
</ul>
</div>
<div id="copyright">
<ul>
<li>Captures by <35MM_COPYRIGHT_FOR_FOOTER><br /></li>
</ul>
</div>
</div> <!-- id=wrapper -->
</div> <!-- id=royal-wrapper -->
<35MM_GOOGLEANALYTICS>
</body>
</html>

merci d'avance
kristof

A voir également:

2 réponses

tryan44 Messages postés 1288 Date d'inscription mardi 24 janvier 2012 Statut Membre Dernière intervention 26 octobre 2014 220
27 mai 2012 à 18:39
Salut,

Ajoute sur la class #footer:
float:left;
position:absolute;

et sur la class #copyright :
float:right;

..et ça devrait le faire :).
1
mpmp93 Messages postés 6648 Date d'inscription mercredi 13 avril 2011 Statut Membre Dernière intervention 28 septembre 2015 1 339
27 mai 2012 à 21:11
Bonsoir:

1) pas GLOP:

<div id="footer">
<ul>
<li>Powered by <a onclick="window.open(this.href); return false;" href="https://github.com/pixelpost/pixelpost/wiki" title="Pixelpost">Pixelpost</a></li>
<li>·</li>
<li>Theme by <a onclick="window.open(this.href); return false;" href="https://theworldin35mm.org/">The World in 35mm</a></li>
</ul>
</div>
<div id="copyright">
<ul>
<li>Captures by <35MM_COPYRIGHT_FOR_FOOTER><br /></li>
</ul>
</div>
</div>

2) GLOP:

<footer>
<section>
Powered by <a onclick="window.open(this.href); return false;" href="https://github.com/pixelpost/pixelpost/wiki" title="Pixelpost">Pixelpost</a> .
Theme by <a onclick="window.open(this.href); return false;" href="https://theworldin35mm.org/">The World in 35mm</a>
</section>
<section>
Captures by <35MM_COPYRIGHT_FOR_FOOTER>
</section>
</footer>


et le css:

footer { display: block; width: 100%: }
footer section { display: block; text-align: left; }
footer section + section { text-align: right; }



1