Bonjour a tous, je gere un affichage dynamique qui est stoqué dans une Bdd en varchar qui est du texte, pour le positionner je l'ai mi dans des div que je place via mon CSS, je lui ai mi une largeur et un margin left et right mais il ne tiens pas compte de ma marge right et de sa largeur droite, j'pensait que le texte une fois arriver a la fin de la largeur de la div ce mettrai a la ligne...

S'avez vous comment on peux faire pour qu'il prenne les marge en compte et qu'il ce mette a la ligne une fois cette limite ateint...


Mon 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
 
<body>
 
<table id="page-table"><tr><td id="page-td">
 
<div id="conteneur">
 
 
<div id="menu_gauche">
 
<?php
 
$serveur ="localhost";
$login = "root";
$mot_passe = "";
$base = "artkateo";
 
 
 
$connexion = mysql_pconnect($serveur, $login, $mot_passe) or die ("impossible de se connecter a MySQL : ".mysql_error());
 
 
 
$mabase = mysql_select_db($base) or die ("impossible de ce connecter ma table : ".mysql_error());
$requete = "select * from actualite";
 
		$resultat = mysql_query($requete);
 
		while ($row = mysql_fetch_row($resultat))
 
		{
 
		$titre = $row[1];
 
		$date = $row[2];
 
		$lieu = $row[3];
 
		$resume = $row[4];
 
		$image = $row[5];
 
 
 
		echo '<div id="titre">'.$titre.'</div>';
 
		echo '<div id="date">'.$date.'</div>';
 
		echo '<div id="lieu">'.$lieu.'</div>';
 
		echo '<div id="resume">'.$resume.'</div>';
 
		echo '<div id="img">$image</div>';
 
		}
 
 
 
?>
 
 
 
</div>
<div id="menu_haut"></div>
 
<div id="menu_droit"></div>
 
 
<div id="contenu">
 
<iframe name="contenu" src="" marginheight="0" marginwidth="0" width="460" height="470" scrolling="auto" frameborder="0">accueil</iframe>
 
 
</div>
 
<div id="bas_page"></div>
</div>
 
</td></tr></table>
 
</body>
</html>


Mon 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
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
{
	list-style-type: none;
	margin : 0px;
	padding:0px;
}
 
html {
	height: 100%;
}
 
 
body{
 
	font-family: "Times New Roman", Times, serif;
	height: 100%;
	margin: 0px;
	padding: 0px;
	background-color: #ffffff;
 
}
 
/*------------ Les 3 étapes suivantes sont pour centrer le contenu de la page */
 
.centrer {
  margin-left: auto;
  margin-right: auto;
  width : 1000px;
  text-align : left;  /* pour résoudre le bug de centrage de IE */
}
 
 
#page-table {
	height: 100%;
	width: 100%;
	border-collapse: collapse;
	text-align: center;
}
#page-td {
	height: 100%;
	padding: 0;
	vertical-align: middle;
}
 
/* -----------  Div principal (ou conteneur)*/
 
#conteneur{
	position: relative;
	margin-left: auto;
	margin-right: auto;
	text-align: left;
	width: 810px;
	height: 610px;
 
}
 
/*-------------Div du menu gauche */
 
#menu_gauche{
	width: 280px;
	height: 610px;
	background-image: url(../images/menu_gauche.jpg);
 
} 
 
/*-------------------Div du menu du haut */
 
#menu_haut{
	position: absolute;
	top: 0px;
	width: 460px;
	height: 90px;
	margin-left: 280px;
	background-image: url(../images/menu_haut.jpg);
}
 
 
#menu_droit{
	position: absolute;
	top: 0px;
	margin-left: 740px;
	width: 70px;
	height: 610px;
	background-image: url(../images/menu_droit.jpg);
 
}
 
#contenu{
	position: absolute;
	margin-left: 280px;
	margin-bottom: 0px;
	margin-right: 0px;
	margin-top: 0px;
	top: 90px;
	width: 460px;
	height: 470px;
 
}
 
#bas_page{
	position: absolute;
	margin-left: 280px;
	top: 560px;
	width: 460px;
	height: 50px;
	background-image: url(../images/bas.jpg);	
}
 
#titre{
	text-align: center;
	margin-top: 20px;
	margin-left: 30px;
	margin-right: 70px;
  font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
  width: 180px;
  color: White;
 
}
 
#date{
	text-align: center;
	margin-top: 20px;
	margin-left: 30px;
	margin-right: 70px;
  font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
  width: 180px;
  color: White;
 
}
 
#lieu{
	text-align: center;
	margin-top: 20px;
	margin-left: 30px;
	margin-right: 70px;
  font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
  width: 180px;
  color: White;
 
}
 
#resume{
	text-align: center;
	margin-top: 30px;
  font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
  margin-left: 30px;
	margin-right: 70px;
	width: 180px;
  color: White;
 
}
 
#img{
	text-align: center;
	margin-top: 50px;
	margin-left: 30px;
	margin-right: 70px;
	width: 180px;
  color: White;
 
}



Merci d'avance!!!