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 16/12/2010, 20h23   #1
Invité de passage
 
Inscription : août 2009
Messages : 5
Détails du profil
Informations forums :
Inscription : août 2009
Messages : 5
Points : 0
Points : 0
Par défaut Taille du contenu qui s'adapte mal par rapport à la taille de la sidebar

Salut à tous! Cela fait quelques temps que je galère à résoudre ce petit problème (enfin j'espère qu'il est "petit")

Je précise que c'est un blog que je fais sous Wordpress et que j'ai fais entièrement le thème.

Le problème :
La taille de la colonne ne s'adapte pas à la taille du contenu et inverse.

Comme une image vaut mieux qu'un long discours, je vous joint une image.

Pouvez-vous me filer un coup de main ?
L'adresse du blog : http://champigneullesbasketball.fr/blog/
Je vous laisse le CSS et le HTML de la page d'accueil

Merci tout le monde !!!!

HTML :

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
61
62
63
 
 
<?php get_header(); ?> <!-- ouvrir header,php --> 
 
<div id="contenu"> 
           <div id="content"> 
                       <?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?> 
 
           <div class="post" id="post-<?php the_ID(); ?>"> 
                       <h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2> 
 
 
<div class="postmetadata"> 
 
      <div class="post-date"> 
 
           <p class="day"> 
 
                  <?php the_time('d/m/y') ?> 
 
           </p> 
 
      </div> 
 
      <div class="postinfo"> 
 
            <p class="auteurgauche">Posté par <?php the_author() ?> dans <?php the_category(', ') ?></p> 
 
      </div> 
 
      <div class="postcomm"> 
 
            <p class="commentairedroite"><?php comments_popup_link('Aucun commentaire', '1 Commentaire', '% Commentaires'); ?> </p> 
 
      </div> 
 
</div>  
 
 
 
           <div class="post_content"> 
                       <?php the_content(); ?> 
           </div> 
           </div> 
 
           <?php endwhile; ?> 
 
<div class="navigation"> 
<?php posts_nav_link(' - ','page suivante','page pr&eacute;c&eacute;dente'); ?> 
</div> 
 
           <?php endif; ?> 
           </div> 
 
 
<?php get_sidebar(); ?> 
</div> 
<?php get_footer(); ?> 
 
 
</div> 
</body> 
</html>

CSS:

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
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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
 
/* 
Theme Name: Frogz Theme 
Theme URI:  http://www.champigneullesbasketball.fr/blog/ 
Description: Mon premier theme cree par Ludovic Vincent 
Version: 0.1 
Author: Ludovic Vincent 
 
Frogz Theme by Ludovic Vincent  
 
*/ 
 
body { 
           font-family: Lucida Grande, Arial, Helvetica, Sans-serif; 
           font-size: 0.8em; 
           text-align: left; 
           background-color: #999393; 
           margin: 0; 
 
} 
 
 
#page { 
           margin: 0 auto 0 auto; 
           width: 900px; 
 
 
} 
 
 
#header { 
           font-family: Trebuchet MS, Lucida Grande, Arial, Helvetica, Georgia, Sans-serif; 
           float: left; 
           background:url(/blog/wp-content/themes/frogztheme/composants/headernew.jpg); 
           width: 900px; 
           padding: 0 0px 0px 0px; 
           height: 181px; 
 
} 
 
 
#logoheader { 
           float: left; 
           width: 355px; 
           margin-bottom: 20px; 
           height: 142px; 
           margin-top: 5px; 
           margin-left: 10px; 
} 
 
 
#fblogo { 
           float: right; 
           height: 55px; 
           width: 48px; 
           border: 0px; 
           margin-left: 400px; 
           margin-top: 10px; 
 
} 
 
 
 
 
 
#loupe { 
           background:url(/blog/wp-content/themes/frogztheme/composants/loupe.png); 
           height: 27px; 
           width: 27px; 
           margin-left: 294px; 
           margin-top: 90px; 
           float:left; 
} 
 
#searchbar { 
 
           margin-left: 685px; 
           margin-top: 155px; 
 
} 
 
#contenu {            
           width: 900px;            
           margin-left:0 px; 
 
 
} 
 
#content { 
           margin-top: 0px; 
           float: left; 
           width: 660px; 
           margin-left: 0px; 
           background-color: #ffffff; 
 
 
 
} 
 
.sidebar { 
           float: right; 
           width: 240px; 
           background-color: #dfe6e7; 
           margin-right: 0px; 
} 
 
.logohautsidebar { 
           background:url(/blog/wp-content/themes/frogztheme/composants/logosansfrogz.png); 
           height:120px; 
           width:228px; 
           margin-left: 5px; 
           margin-top: 10px; 
           float: left; 
           clear: both; 
} 
 
 
 
#header h1 { 
        padding: 0 20px 0 0; 
        font-size: 2em; 
        text-align: right; 
} 
 
#header p { 
        padding: 0 20px 0 0; 
        font-size: 1em; 
        text-align: right; 
} 
 
#content h2 { 
        font-size: 1.3em; 
        margin-left: 20px; 
        padding: 0px; 
        margin-top: 20px; 
        margin-bottom: 0px; 
} 
 
 
.commentaire { 
        float: left; 
        font-size: 0.8em; 
        color: #999; 
 
} 
 
.postmetadata {         
        margin-left:18px; 
        margin-top: 0px; 
        height: 40px; 
        width: 448px; 
        margin-bottom: 16px; 
        background-image:url(/blog/wp-content/themes/frogztheme/composants/bandeaucomm.png); 
 
} 
 
 
.post-date { 
        padding-left:17px; 
        float:left; 
        font-weight:bold; 
        margin-top:11px; 
        font-size: 1.7em; 
} 
 
 
 
 
.postinfo{ 
 
 
        font-size: 1em; 
        color: #999; 
        margin-left: 25px; 
        margin-top: 13px; 
        float: left; 
} 
 
.postcomm{ 
        font-size: 1.1em; 
        color: #999; 
        margin-left: 100px; 
        margin-top: 13px; 
        float: left; 
 
} 
 
 
.like { 
        margin-top: 10px; 
} 
 
.postmetadata p { 
        font-size: 0.8em; 
        color: #999; 
        margin-left: 0px; 
        margin-top: 0px; 
} 
 
.post_content { 
        font-size: 1em; 
        color: #555; 
        margin-left: 20px; 
        width: 470px; 
} 
 
.navigation { 
        margin: 50%; 
} 
 
.sidebar ul{ 
        list-style-type: none; 
        margin: 0; 
        padding: 0 0px; 
} 
 
 
 
.sidebar h2 { 
        font-size: 1.2em; 
} 
 
.positiontextesidebar h2{ 
        background:url(/blog/wp-content/themes/frogztheme/composants/bandeausidebar.gif); 
        background-repeat: x; 
        height: 30px; 
        width:240px; 
 
 
 
} 
 
 
.positiontextesidebar { 
        margin-top: 120px; 
 
 
} 
 
#positiontextesidebar p{ 
        margin-left: 10px; 
} 
 
#footer p{ 
        padding-top: 40px; 
        font-size: 1em; 
        text-align: center 
} 
 
.comments-template{ 
    margin: 10px 0 0 0; 
        margin-left: 20px; 
} 
 
.comments-template ol{ 
    margin: 10px; 
    padding: 0 0 0 15px; 
    list-style: none; 
} 
 
.comments-template ol p{ 
    font-family: Trebuchet MS, Arial, Hevletica, Sans-serif; 
    font-size: 0.9em; 
} 
 
.comments-template ol li{ 
    margin: 10px 0 0 0; 
    line-height: 15px; 
    padding: 0 0 10px; 
} 
 
.comments-template h2, .comments-template h3{ 
    font-size: 1.2em; 
 
} 
 
.commentmetadata{ 
    font-size: 0.9em; 
} 
 
.comments-template p.nocomments{ 
    padding: 0; 
} 
 
.comments-template textarea{ 
    font-family: Trebuchet MS, Arial, Hevletica, Sans-serif; 
    font-size: 0.9em; 
 
} 
 
.cadre_commentaires { 
        border-bottom: 1px solid #ccc; 
        border-top: 1px solid #ccc; 
 
} 
 
#precnext { 
        width:660; 
 
margin-bottom:50px; 
} 
 
#artavt { 
        float: left; 
        width:320px; 
        text-align:right; 
} 
 
#artsvt { 
        float: left; 
        width:320px; 
        margin-left:20px; 
} 
 
a { 
        color: #555; 
        text-decoration: none; 
} 
 
a:hover { 
        color: #777; 
        text-decoration: underline; 
} 
 
#content h2 a{ 
       font-size: 1.2em; 
       font-family: Century Gothic, Lucida Grande, Verdana, Arial, Sans-Serif; 
       color: #006699; 
} 
 
#content h2 a:hover{ 
       color: #555; 
} 
 
 
 
#footer a{ 
        color:#000000; 
        font-weight:bold; 
} 
 
#footer { 
        font-size: 1em; 
        background:#12748F;       
        clear: both; 
        width: 900px; 
        height: 110px; 
        background-image:url(/blog/wp-content/themes/frogztheme/composants/footerr.jpg) ; 
 
        float:none; 
position:relative; 
 
}
Images attachées
Type de fichier : jpg Sans-titre-2.jpg (140,6 Ko, 4 affichages)
ludo54 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 17/12/2010, 13h53   #2
Rédacteur/Modérateur
 
Homme Jérome Debray
Responsable de projet
Inscription : mai 2009
Messages : 627
Détails du profil
Informations personnelles :
Nom : Homme Jérome Debray
Âge : 32
Localisation : France

Informations professionnelles :
Activité : Responsable de projet
Secteur : High Tech - Multimédia et Internet

Informations forums :
Inscription : mai 2009
Messages : 627
Points : 3 064
Points : 3 064
Bonjour,

je suis allé sur ton site et c'est la sidebar qui ne va pas jusqu'en bas.

Voici ce qu'il faut faire:

pour #page, rajoute ceci:
Code css :
1
2
 
background-color: #DFE6E7;

pour #contenu rajoute ceci:
Code css :
1
2
 
position: relative;

et enfin voici le code css pour .sidebar
Code css :
1
2
3
4
5
6
7
8
9
10
 
.sidebar {
   bottom: 0px;
   height: 100%;
   margin-right: 0px;
   position: absolute;
   right: 0px;
   top: 200px;
   width: 240px;
}

++
ornitho13 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 17/12/2010, 17h41   #3
Invité de passage
 
Inscription : août 2009
Messages : 5
Détails du profil
Informations forums :
Inscription : août 2009
Messages : 5
Points : 0
Points : 0
Salut !
Merci d'avoir pris le temps de me répondre !
J'ai essayé ta solution mais rien ne change, en plus je n'ai pas vu le moindre petit mouvement. Rien n'a bougé dans la page...

Je bataille encore et c'est pas gagné ...
ludo54 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 17/12/2010, 22h59   #4
Candidat au titre de Membre du Club
 
Inscription : juillet 2007
Messages : 31
Détails du profil
Informations forums :
Inscription : juillet 2007
Messages : 31
Points : 14
Points : 14
Juste pour etre sur, tu voudrais que ta sidebar ai la même hauteur que ton content ? (et inversement)
ciberrique est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 17/12/2010, 23h29   #5
Invité de passage
 
Inscription : août 2009
Messages : 5
Détails du profil
Informations forums :
Inscription : août 2009
Messages : 5
Points : 0
Points : 0
Oui c'est cela il faudrait que la hauteur du content et la sidebar soit la même. Sachant que cette hauteur varie en fonction des pages ( plus ou moins d'articles)

En fait, j'aimerais qu'à chaque fois, la sidebar et le content se colle au footer.
ludo54 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 18/12/2010, 20h14   #6
Candidat au titre de Membre du Club
 
Inscription : juillet 2007
Messages : 31
Détails du profil
Informations forums :
Inscription : juillet 2007
Messages : 31
Points : 14
Points : 14
Bonsoir, désolé si je n'ai pas répondu avant, il semble que j'ai mal configuré mon compte je n'ai pas reçus d'alerte de votre réponse.

Donc concernant votre problème je vois deux solution :

- Tricher en mettant un fond de même schéma que la sidebar a droite dans un bloc contenu . (pas très beau mais fonctionne)

-Sinon il faut utilser un display:tab-cell et des commentaires conditionnels pour ie7 et 6

J'explicite la derniere avec un exemple, d'abord l'html :
Code :
1
2
3
4
5
 
<div class="conteneur">
	<div id="colonne1">qsd<br /><br />div>
	<div id="colonne2">sdfsdf</div>
</div>
Ensuite le css :
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
 
 
<style  type="text/css">
 
.conteneur{
	display:table;
}
 
.conteneur div{
	background-color:blue;
	width:100px;
	display:table-cell;
}
 
</style>
 
<!--[if lte IE 7]>
<style  type="text/css">
 
.conteneur{
	overflow: hidden;
}
 
.conteneur div{
	float: left;
	padding-bottom: 2000px;	
	margin-bottom: -2000px;
}
 
</style>
<![endif]-->
 
<!--[if lte IE 6]>
<style  type="text/css">
.conteneur{
	height: 1%;
}
</style>
<![endif]-->
J'espère avoir était utile ^^
ciberrique est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 03h05.


 
 
 
 
Partenaires

Hébergement Web