bonjour a tous,


voila j'ai un probleme de decoupe pour plus avoir ceci




je voudrais laisser que deux grosse categorie et mettre els autre en dessous et ce par deux, la mon code en comporte 6 donc j'essaye de mettre 3 fois 2 categorie.


Merci de votre aide. voici mon code php du fichier qu'il me semble etre le bon a modivier

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
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
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
<?php
    class d3ribbon
    {
        /**
        * D3Ribbon Class and Styles Folder Name
        * @var string
        */
        public  $main_folder    = 'd3ribbon';
        /**
        * Style folder name
        *
        * @var mixed
        */
        public  $stlye          = 'blue';
        /**
        * Active tab for creating groups and buttons.
        *
        * @var mixed
        */
        public  $selected_category_id;
        /**
        * Active Button for set as selected
        *
        * @var mixed
        */
        public  $selected_button_id;
        /**
        * Category Objects
        *
        * @var mixed
        */
        private $categories     =array();
        /**
        * Group Objects
        *
        * @var mixed
        */
        private $groups         =array();
        /**
        * Button Objects
        *
        * @var mixed
        */
        private $buttons        =array();
 
           /**
           * Add Category (Tab)
           *
           * @param mixed $category_name
           * @param mixed $category_link
           * @param mixed $category_id
           *
           * @return mixed category id
           */
         public function add_category($category_name,$category_link, $category_id = null)
        {
            if($category_id === null)
                $category_id = count($this->categories)+1;
 
            $this->categories[$category_id]=array(
            'name' => $category_name,
            'link' => $category_link,
            'id' => $category_id
            );
            return (string)$category_id;
        }
        /**
        * Add Group to a Created Category
        *
        * @param mixed $category_id   owner category id
        * @param mixed $group_name    group display name
        * @param mixed $group_width   group width
        * @param mixed $group_id      group id
        * @return string group id
        */
        public function add_group($category_id,$group_name,$group_width = null,$group_id = null)
        {
            if($group_id === null)
                $group_id = count($this->groups) + 1;
 
            $this->groups[$category_id][$group_id] = array(
            'name'          => $group_name,
            'id'            => $group_id
            );
 
            $this->groups[$category_id][$group_id]['width'] = $group_width;
 
            return (string)$group_id;
        }
 
        /**
        * Add a button to created group
        *
        * @param mixed $group_id   owner group id
        * @param mixed $button_name button display name
        * @param mixed $link        button link
        * @param mixed $image       button image
        * @param mixed $button_id   button id
        */
        function add_button($group_id,$button_name,$link,$image,$button_id=null)
        {
            if($button_id === null)
                $button_id = count($this->buttons)+1;
 
            $this->buttons[$group_id][$button_id]=array(
            'name' => $button_name,
            'link' => $link,
            'image' => $image,
            'id'  => $button_id
            );
 
            return $button_id;
        }
 
        /**
        * Build the Ribbon.
        *
        * @param mixed $return
        */
        function build($return = true)
        {
 
            $ribbon='<table width="100%" cellspacing="0" cellpadding="0">
            <tr>
            <td id="cdnavcont" align="center">

            '.$this->build_ribbon_header($this->selected_category_id).'

            </td>
            </tr>
            <tr>
            <td id="cdribbon" valign="top" align="center">
            '.$this->build_ribbon_body($this->selected_category_id).'
            </td></tr>
            </table>  ';
 
            if ($return)
                return $ribbon;
            else
                echo $ribbon;
        }
        /**
        * Build Ribbon header for categories
        *
        * @param mixed $selected_category_id
        * @param mixed $return
        */
        private function build_ribbon_header($selected_category_id,$return = true)
        {
            $header = '<div id="cdnavheader">
            <ul>
            '.$this->build_ribbon_category_links($selected_category_id).'
            </ul>
            </div>';
 
            if ($return)
                return $header;
            else
                echo $header;
 
        }
        /**
        * Build Category Links.
        *
        * @param mixed $selected_id
        * @param mixed $return
        */
        private function build_ribbon_category_links($selected_id = '',$return = true)
        {
            $cat_links = '';
            foreach ($this->categories as  $cat)
            {
                $cat_links.=$this->build_ribbon_category_link($cat['id'],$selected_id == $cat['id']);
            }
 
            if ($return)
                return $cat_links;
            else
                echo $cat_links;
        }
        /**
        * Build single category
        *
        * @param mixed $category_id
        * @param mixed $selected
        * @param mixed $return
        */
        private function build_ribbon_category_link($category_id,$selected = false,$return = true)
        {
            $cat = &$this->categories[$category_id];
            $category_link = '<li id="'.($selected ? 'current' : 'cat_'.$category_id).'"><a href="'.$cat['link'].'"><span>'.$cat['name'].'</span></a></li> ';
 
            if($return)
                return $category_link;
            else
                echo $category_link;
 
        }
        /**
        * Build Ribbon body (Groups and buttons )
        *
        * @param mixed $category_id
        * @param mixed $return
        */
        private function build_ribbon_body($category_id,$return = true)
        {
            $rbody =  '<div id="ribbon_cd">
            <table cellpadding="0" cellspacing="0" width="100%" border="0">
            <tr valign="top">
            <td width="2" class="cdribtopl">&nbsp;</td>
            <td width="946" class="cdribtopc"><div></div></td>
            <td width="2" class="cdribtopr"></td>
            </tr>
            <tr valign="middle" height="79">
            <td width="1" class="cdribmidl"><div></div></td>
            <td width="946" class="cdribmidc">
            <div style="padding-top:1px;" id="ribbon_burda">
            <table cellpadding="0" cellspacing="0" border="0" class="cdribbontext">
            <tr valign="top">
            <td width="2"> </td>

            '.$this->build_groups($category_id).'

            </tr>
            </table>
            </div>
            </td>
            <td width="1" class="cdribmidr"> <div></div></td>
            </tr>
            <tr valign="top">
            <td width="2" class="cdribbotl">&nbsp;</td>
            <td width="946" class="cdribbotc"></td>
            <td width="2" class="cdribbotr"></td>
            </tr>
            </table>

            </div>';
 
            if ($return)
                return $rbody;
            else
                echo $rbody;
        }
        /**
        * Build All  Groups with their buttons by  category_id
        *
        * @param mixed $category_id
        * @param mixed $return
        */
        function build_groups($category_id,$return = true)
        {
            $groups = "";
            if (isset($this->groups[$category_id]) && is_array($this->groups[$category_id]))
            {
                foreach ($this->groups[$category_id] as $group)
                {
                    $groups.=$this->build_group($category_id,$group['id']);
                }
            }
 
            if ($return)
                return $groups;
            else
                echo $groups;
        }
        /**
        * Build Single Group
        *
        * @param mixed $category_id
        * @param mixed $group_id
        * @param mixed $return
        */
        private function build_group($category_id,$group_id,$return = true)
        {
 
            $group = &$this->groups[$category_id][$group_id];
 
            return ' <td>
            <div class="cntRibbonborder">
            <table cellpadding="0" cellspacing="0"  border="0">
            <tr>
            <td width="2" class="cdchutopl"></td>
            <td class="cdchutopc"><div></div></td>
            <td width="2" class="cdchutopr"></td></tr>
            <tr valign="middle" height="74">
            <td width="1" class="cdchumidl"><div></div></td>
            <td '.(isset($group['width']) ?  'width="'.$group['width'].'"' : '').' class="cdchumidc" onmouseover="this.className=\'cdchumidcover\'" onmouseout="this.className=\'cdchumidc\'">

            <table height="85" cellspacing="0" width="100%">
            <tr><td class="buttonlar">

            <table height="100%">
            <tr>
            '.$this->build_buttons($group_id).'
            </tr>
            </table>

            </td></tr>
            <tr><td class="kategori_foot" align="center">'.$group['name'].'</td></tr>
            </table>
            </td>
            <td width="1" class="cdchumidr"><div></div></td>
            </tr>
            <tr valign="top"><td width="2" class="cdchubotl">
            </td><td class="cdchubotc"><div></div></td>
            <td width="2" class="cdchubotr"></td>
            </tr>
            </table>

            </div>
            </td>

            <td width="2"></td>  ';
 
        }
        /**
        * Build all buttons in a group
        *
        * @param mixed $group_id
        * @param mixed $return
        */
        private function build_buttons($group_id,$return = true)
        {
            $buttons = "";
            if (isset($this->buttons[$group_id]) && is_array($this->buttons[$group_id]))
            {
                foreach ($this->buttons[$group_id] as $btn)
                {
                    $buttons.=$this->build_button($group_id,$btn['id']);
                }
            }
            if ($return)
                return $buttons;
            else
                echo $buttons;
        }
 
        /**
        * build single button by id.
        *
        * @param mixed $group_id
        * @param mixed $button_id
        * @param mixed $return
        */
        private function build_button($group_id,$button_id,$return = true)
        {
            $button = &$this->buttons[$group_id][$button_id];
 
            if ($this->selected_button_id==$button_id)
            {
                $c1="button_over";
                $c2="button_over";
            }
            else
            {
                $c1="button";
                $c2="button_over";
            }
 
            $button_code = '<td align="center" class="'.$c1.'" onmouseover="this.className=\''.$c2.'\';" onmouseout="this.className=\''.$c1.'\';">
            <a href="'.$button['link'].'"><img border="0" src="'.$button['image'].'" width="32"><br>
            '.$button['name'].'   </a>
            </td>';
            if ($return)
                return $button_code;
            else
                echo $button_code;
 
        }
        /**
        *  get style folder path
        */
        public function stlyes_folder()        { return $this->main_folder.'/styles/';  }
        /**
        * get style file
        *
        */
        public function style_file()           { return $this->stlyes_folder().$this->stlye.'/d3ribbon.css';   }
        /**
        * get style file link
        *
        */
        public function style_link()           { return '<link href="'.$this->style_file().'" type="text/css" rel="stylesheet">';}
 
    }
?>
et mon code css si besoin

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
body{padding:0px;margin:0px;font-size:12px;font-family: 'Segoe UI';}
#cdnavheader{float:left; width:902px;color:#11449E;font-family:Arial,Helvetica,sans-serif; font-size:12px;line-height:1.2em;font-weight:bold; padding:0px 34px 0px 34px;}
#cdnavheader ul{margin:0;padding:0;list-style:none;}
#cdnavheader li{float:left; margin:0;padding:0;}
#cdnavheader a{float:left;background-image:url(left_both.gif); background-repeat:no-repeat;background-position:left top; margin:0;padding:0 0 0 8px; text-decoration:none;}
#cdnavheader a span{display:block;background-image:url(right_both.gif); background-repeat:no-repeat;background-position:right top; padding:6px 12px 4px 4px; font-weight:bold; color:#11449E;}
#cdnavheader #current a{background-repeat:no-repeat;background-image:url(left_both_on.gif); background-position:0 -150px; border-width:0;border-bottom:1px solid #dfebfc;}
#cdnavheader #current a span{background-repeat:no-repeat;background-image:url(right_both_on.gif); background-position:100% -150px; padding:5px 12px 6px 4px; color:#11449E;}
#cdnavheader a span{float:none;}
#cdnavheader a:hover{background-position:0 -150px;}
#cdnavheader a:hover span{background-position:100% -150px;}
#cdnavcont{background-image:url(bg_navcon.gif);background-repeat:repeat-x;background-position:bottom;background-color:#CBE0FD;}
#cdribbon{height:0px;padding:4px 10px 0 10px;background-image:url(bg_ribbon.jpg);background-position:top;background-repeat:repeat-x;}
 
.button{padding:3px 4px 3px 4px;color:#15428b;font-size:11px;font-weight: 700;}
.button a:link{color:#15428b;font-size:11px;font-weight: 700;}
.button a:visited{color:#15428b;font-size:11px;font-weight: 700;}
.button a:hover{color:#15428b;font-size:11px;font-weight: 700;}
 
.button_over{padding:3px 4px 3px 4px;color:#15428b;font-size:11px;background:url(btover.png);cursor:Pointer;font-weight: 700;}
.button_over a:link{color:#15428b;font-size:11px;cursor:Pointer;font-weight: 700;}
.button_over a:visited{color:#15428b;font-size:11px;cursor:Pointer;font-weight: 700;}
.button_over a:hover{color:#15428b;font-size:11px;cursor:Pointer;font-weight: 700;}
 
.no_perm{padding:3px 4px 3px 4px;color:#15428b;font-size:11px;background:url(no_perm_bg.png);cursor:Pointer;font-weight: 700;}
.no_perm a:link{color:#15428b;font-size:11px;cursor:Pointer;font-weight: 700;}
.no_perm a:visited{color:#15428b;font-size:11px;cursor:Pointer;font-weight: 700;}
.no_perm a:hover{color:#15428b;font-size:11px;cursor:Pointer;font-weight: 700;}
 
 
.kategori_foot{font-size:11px;color:#576aaa;height:11px;font-weight: 700;}
 
.cdribtopl{background-image:url(rib_l_t.gif); font-size:2px;line-height:2px;}
.cdribtopc{border-top:1px solid #8aafe1;background-color:#e1eaf6;}
.cdribtopr{background-image:url(rib_r_t.gif);}
.cdribmidl{border-right:none; border-left:1px solid #8aafe1; background-color:#c8f1f9;}
.cdribmidc{background-image:url(rib_c_c.gif);border-bottom:1px solid #E0EDFD;}
.cdribmidr{border-left:none; border-right:1px solid #8aafe1; background-color:#c8f1f9;}
.cdribbotl{background-image:url(rib_l_b.gif); font-size:6px;background-repeat:no-repeat;}
.cdribbotc{background-image:url(rib_c_b.gif);background-repeat:repeat-x;}
.cdribbotr{background-image:url(rib_r_b.gif); background-repeat:no-repeat;}
.cdchutopl{background-image:url(chu_l_t.gif); font-size:2px;line-height:2px;}
.cdchutopc{border-top:1px solid #a4c0dc;background-color:#fff;}
.cdchutopc div,.cdchubotc div,.cdribtopc div{height:1px;line-height:1px;font-size:1px;overflow:hidden;}
.cdchutopr{background-image:url(chu_r_t.gif);}
.cdchumidl{border-right:none; border-left:1px solid #9dbcda; background-color:#fff;}
.cdchumidl div,.cdchumidr div,.cdribmidl div,.cdribmidr div{width:1px;overflow:hidden;}
.cdchumidc,.cdchumidcover{background-image:url(chu_c_c.gif);background-position:bottom;background-repeat:repeat-x;background-color:#E3EFFF;}
.cdchumidcover{background-image:url(chu_c_c_on.gif);background-color:#EFF7FF;}
.cdchumidr{border-left:none; border-right:1px solid #9fbedb; background-color:#fff;}
.cdchubotl{background-image:url(chu_l_b.gif); font-size:2px;line-height:2px;background-position:bottom left;}
.cdchubotc{border-bottom:1px solid #71a4ce;background-color:#fff;}
.cdchubotr{background-image:url(chu_r_b.gif); background-position:bottom right;}
.cdLNavCornerLeft,.cdLNavCornerRight{background-repeat:no-repeat;font-size:1px;height:6px;}
.cdLNavBorderTop{border-top:1px solid #8AAFE1;}
.cdLNavBorderRight{border-right:1px solid #8AAFE1;}
.cdLNavBorderLeft{border-left:1px solid #8AAFE1;}
.cdLNavSpaceLeft{border-left:1px solid #8AAFE1;}
.cdLNavSpaceRight{border-right:1px solid #8AAFE1;}
.cdBreadBgColor{background-color:#CDE0FD;}
.cdLeftNavBgColor{background-color:#EDF4FC;}
.cdLeftNavMinHeight{height:400px;}
.cntHHBody {font-family:Tahoma, Arial, Verdana, Helvetica}
p.cntHHBody {font-size:1.1em}
 .cntBorderWR {margin-bottom:18px; border:solid 1px #cccccc}
.cntHspace {height:15px; border-style:none; border-width:0px}
.cntVspace {width:15px; border-style:none; border-width:0px}
.cntHeavy {font-weight:bold}
.cntBorder1 {border:solid 1px #cccccc}
.cnt11font {font-size:1.1em}
/* Ribbon */

Merci de votre aide