Bonjour à tous!
J'ai une petite question concernant CSS. Je ne suis pas un expert, mais j'essai... Je fais face au problème suivant que certain vont pouvoir corriger en un tour de main! J'en suis convaincu... J'ai un formulaire qui est le suivant :
Et un fichier style (CSS) qui correspond au suivant :
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 <span id="clotheMiniForm"> <span id="category"> <label for="lstCategory" id="lblCategory">Category</label> <select name="lstCategory" id="lstCategory"><option value="14">Bag</option> <option value="16">Dress</option> <option value="17">Handbag</option> <option value="6">Jeans</option> </select> </span> <span id="season"> <label for="season" id="lblSeason">Season</label> <select name="lstSeason" id="lstSeason"> <option value="1">Spring 2008</option> </select> </span> <br /> <span id="brandDesigner"> <label for="brandDesigner" id="lblBrandDesigner">Brand / Designer</label> <input type="text" id="txtBrandDesigner" /> </span> </span>
Si vous jeter un coup d'oeil à l'image, vous aller voir que la champ sur la 2e ligne est plus long que les deux premiers de la première ligne. J'ai cru tout d'abord que c'étais un problème de marges, mais ca ne semble pas la cas. Comment faire pour que le champ de la seconde ligne soit exactement de la même longueur que les deux de la ligne précédente en utilisant l'unité EM.
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 body { font-family: Cambria,Georgia,Palatino,Palatino Linotype,Myriad Pro,Serif; font-size: 0.95em; } br { clear: left; } #clotheMiniForm { } #clotheMiniForm #category, #season { display:inline-block; float: left; width:10em; padding: 0; } #clotheMiniForm #brandDesigner { display:inline-block; float: left; width:20em; padding: 0; margin: 0; } #clotheMiniForm #color{ display:inline-block; float: left; width:5em; margin:0 0em 0 0; } #lblCategory, #lblSeason, #lblBrandDesigner { display:block; } #clotheMiniForm select, input[type="text"], input[type="password"] { width:100%; } #clotheMiniForm input[type="checkbox"], input[type="radio"] { width:auto; }
En passant, si vous avez des suggestions pour améliorer mon CSS, j'apprécierai beaucoup!
Merci!
Martin





Répondre avec citation




Partager