28172 sujets

CSS et mise en forme, CSS3

Bonjour,

j'essaie de placer plusieurs div dans un div conteneur, le problème c'est qu'il y a des espaces blancs, du coup les div ne sont pas aligner verticalement.

J'ai beau cherchre pas trouvé de solutions,
quelqu'un aurait une idée sans passer par des tableaux bien sur Smiley cligne ?

Merci pour votre aide


 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
	<head>
		<style type="text/css">
			body {margin:0; padding: 0;}
			#conteneur {width: 500px; background-color: #ffcc00;}

			#conteneur div {width: 220px; float: left; border: 1px solid black; padding: 5px; margin-left: 10px;}

		</style>
	</head>
	<body>

		<!-- conteneur -->
		<div id="conteneur">


			<div>
			Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
			</div>

			<div>
			The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.
			<br>
			<img src="http://electronicworkshop.net/wp-content/uploads/2009/09/yahoo-mail_logo.jpg" />
			</div>

			<div>
			It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. 
			</div>

			<div>
			There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text. 
			</div>

			<div>
			All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.
			</div>

			<div>
			Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).
			</div>

			
		</div>
		<!-- /conteneur -->
			

		
	</body>

</html>
Merci de pour ton aide.

les border c'est juste pour un repère, tu remarqueras toujours que les div ne sont pas ligner verticalement, une autre idée Smiley rolleyes ?