Bonjour,

J'essais de placer cote a cote plusieurs div dans un div en overflow mais je n'y arrive pas.
Le résultat est que les div se placent l'un au dessous de l'autre.
Ci-dessous le code html et le css.

Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<title>Déplacements</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<link rel="stylesheet" type="text/css" href="styles.css" />
 
</head>
 
<body>
 
  <div id="page">
 
    <div id="dep_bloc">
 
      <div class="dep_lib">LIBELLE 01</div>
      <div class="dep_lib">LIBELLE 02</div>
      <div class="dep_lib">LIBELLE 03</div>
      <div class="dep_lib">LIBELLE 04</div>
      <div class="dep_lib">LIBELLE 05</div>
      <div class="dep_lib">LIBELLE 06</div>
      <div class="dep_lib">LIBELLE 07</div>
 
    </div>
 
  </div>
 
</body>
 
</html>
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
 
* {
margin: 0;
padding: 0;
}
 
html {
font-size: 100%;
}
 
body {
font: 0.8em Arial, Verdana, helvetica, Times New Roman, sans-serif;
color: #000;
background-color: #fff;
}
 
#page {
text-align: left ;
margin: 20px;
}
 
div#dep_bloc {
margin-top: 1em;
margin-bottom: 1em;
height: 8em;
width: 25em;
overflow: auto;
}
 
div.dep_lib {
float: left;
text-align: center;
font-weight: bold;
color: white;
background: #000080;
margin-bottom: 0.1em;
width: 30em;
}
Merci pour vos avis.

Eric