Précédent   Forum des professionnels en informatique > Webmasters - Développement Web > CSS
CSS Forum d'entraide sur l'utilisation des feuilles de style CSS. Avant de poster : Cours CSS, FAQ CSS, Galerie CSS
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 12/12/2011, 10h47   #1
Invité de passage
 
Inscription : mars 2007
Messages : 9
Détails du profil
Informations forums :
Inscription : mars 2007
Messages : 9
Points : 2
Points : 2
Par défaut Aligné verticalement deux div

Bonjour,

Voici mon soucis :

Sur un de mes site, j'affiche en page d'accueil 6 news, deux cote à cote sur 3 lignes



Tous se passe bien quand les articles font la meme hauteur.
Par contre quand ce n'est pas le cas, comme sur la page 2

Ca rend vraiment pas bien..

Comment pourrais je faire pour aligner mes divs verticalement ?

Je vous mets le code d'en ce moment :

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<div id="main">
		<div id="ZoneArticle1">
			<?php $plxShow->plxMotor->plxRecord_arts->loop(); ?>
			 <div class="colLeft">
					<p class="date"><?php $plxShow->artDate('<span>#num_day</span><br />#num_month | #num_year(2)'); ?></p>
					<h2><?php $plxShow->artTitle(); ?></h2>
					<p><?php $plxShow->lang('WRITTEN_BY') ?> <?php $plxShow->artAuthor() ?> </p>
					<?php $plxShow->artChapo(); ?>
					<p class="info_bottom"> <?php eval($plxShow->callHook('MySocialButtons')) ?></span></p>
			 </div>
 
			<?php $plxShow->plxMotor->plxRecord_arts->loop(); ?>
			<div class="colRight">
					<p class="date"><?php $plxShow->artDate('<span>#num_day</span><br />#num_month | #num_year(2)'); ?></p>
					<h2><?php $plxShow->artTitle(); ?></h2>
					<p><?php $plxShow->lang('WRITTEN_BY') ?> <?php $plxShow->artAuthor() ?> </p>
					<?php $plxShow->artChapo(); ?>
					<p class="info_bottom"> <?php eval($plxShow->callHook('MySocialButtons')) ?></span></p>
			</div>
		</div>
		<div id="ZoneArticle2">
			<?php $plxShow->plxMotor->plxRecord_arts->loop(); ?>
			<div class="colLeft">
					<p class="date"><?php $plxShow->artDate('<span>#num_day</span><br />#num_month | #num_year(2)'); ?></p>
					<h2><?php $plxShow->artTitle(); ?></h2>
					<p><?php $plxShow->lang('WRITTEN_BY') ?> <?php $plxShow->artAuthor() ?> </p>
					<?php $plxShow->artChapo(); ?>
					<p class="info_bottom"> <?php eval($plxShow->callHook('MySocialButtons')) ?></span></p>
			</div>
 
			<?php $plxShow->plxMotor->plxRecord_arts->loop(); ?>
			<div class="colRight">
					<p class="date"><?php $plxShow->artDate('<span>#num_day</span><br />#num_month | #num_year(2)'); ?></p>
					<h2><?php $plxShow->artTitle(); ?></h2>
					<p><?php $plxShow->lang('WRITTEN_BY') ?> <?php $plxShow->artAuthor() ?> </p>
					<?php $plxShow->artChapo(); ?>
					<p class="info_bottom"> <?php eval($plxShow->callHook('MySocialButtons')) ?></span></p>
			</div>
		</div>
		<div id="ZoneArticle3">
			<?php $plxShow->plxMotor->plxRecord_arts->loop(); ?>
			<div class="colLeft">
					<p class="date"><?php $plxShow->artDate('<span>#num_day</span><br />#num_month | #num_year(2)'); ?></p>
					<h2><?php $plxShow->artTitle(); ?></h2>
					<p><?php $plxShow->lang('WRITTEN_BY') ?> <?php $plxShow->artAuthor() ?> </p>
					<?php $plxShow->artChapo(); ?>
					<p class="info_bottom"> <?php eval($plxShow->callHook('MySocialButtons')) ?></span></p>
			</div>
 
			<?php $plxShow->plxMotor->plxRecord_arts->loop(); ?>
			<div class="colRight">
					<p class="date"><?php $plxShow->artDate('<span>#num_day</span><br />#num_month | #num_year(2)'); ?></p>
					<h2><?php $plxShow->artTitle(); ?></h2>
					<p><?php $plxShow->lang('WRITTEN_BY') ?> <?php $plxShow->artAuthor() ?> </p>
					<?php $plxShow->artChapo(); ?>
					<p class="info_bottom"> <?php eval($plxShow->callHook('MySocialButtons')) ?></span></p>
			</div>
		</div>
 
</div>
Code :
1
2
3
4
5
6
7
8
9
10
11
12
.colLeft {
 
	float: left;
	width: 450px;
	margin: 0 22px 0px 0;
}
.colRight {
 
	float: right;
	width: 450px;
	margin: 0 22px 0px 0;
}
MErci d'avance,

Zeuth
Zeuth est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 12/12/2011, 10h56   #2
Membre actif
 
Avatar de Emyleen
 
Femme Emeline Dabée
Webmaster
Inscription : mars 2010
Messages : 136
Détails du profil
Informations personnelles :
Nom : Femme Emeline Dabée
Âge : 26
Localisation : France, Aveyron (Midi Pyrénées)

Informations professionnelles :
Activité : Webmaster
Secteur : High Tech - Éditeur de logiciels

Informations forums :
Inscription : mars 2010
Messages : 136
Points : 171
Points : 171
Bonjour!

Essaye de rajouter une <div style="clear:both;"></div> entre chacune de tes zones article ou alors la propriété clear:both dans leur css, cela devrait permettre de les aligner
Emyleen est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 12/12/2011, 10h58   #3
Invité de passage
 
Inscription : mars 2007
Messages : 9
Détails du profil
Informations forums :
Inscription : mars 2007
Messages : 9
Points : 2
Points : 2
Eh ben merci.. ça fonctionne

J'me sens un peu con la :'(

Un énorme Merci Emyleen
Zeuth est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité Cette discussion est résolue.
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 01h28.


 
 
 
 
Partenaires

Hébergement Web