Bonjour,
Je cale sur un problème de largeur de cellules. Voilà mon code et le résultat ci-dessous.
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
<table border=1 width=50%>
    <tr>
        <tr>
            <th rowspan="2" width=12%>&nbsp</th>
            <th rowspan="2" width=12%>&nbsp</th>
            <th>L1C1</th>
            <th>L1C2</th>
            <th>L1C3</th>
            <th>L1C4</th>
            <th rowspan="2" width=12%>&nbsp</th>
            <th rowspan="2" width=12%>&nbsp</th>
        </tr>
        <tr>
            <th>L2C1</th>
            <th>L2C2</th>
            <th>L2C3</th>
        </tr>
    </tr>
</table>
Nom : Capture d’écran 2024-07-07 à 12.27.18.png
Affichages : 200
Taille : 12,3 Ko

Quand je paramètre les largeurs de chaque cellule, ce sont les largeurs les plus grandes qui prennent le pas sur les autres.
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
<table border=1 width=50%>
    <tr>
        <tr>
            <th rowspan="2" width=12%>&nbsp</th>
            <th rowspan="2" width=12%>&nbsp</th>
            <th width=13%>L1C1</th>
            <th width=13%>L1C2</th>
            <th width=13%>L1C3</th>
            <th width=13%>L1C4</th>
            <th rowspan="2" width=12%>&nbsp</th>
            <th rowspan="2" width=12%>&nbsp</th>
        </tr>
        <tr>
            <th width=26%>L2C1</th> <!--   même problème     -->
            <th width=13%>L2C2</th> <!--   si je mets 3x 33%  -->
            <th width=13%>L2C3</th> <!--   3x 33%                 -->
        </tr>
    </tr>
</table>
Nom : Capture d’écran 2024-07-07 à 12.45.51.png
Affichages : 195
Taille : 12,6 Ko

Mon objectif est que les 3 cellules de la ligne L2 occupent la même largeur que les 4 cellules de la ligne L1.
Savez-vous comment modifier mon code pour y parvenir svp ? Merci.