Bonjour,
Je souhaiterais mettre en place le tableau suivant en CSS en utilisant 4 styles seulement.
Je ne veux pas utiliser de top, left, mais seulement des float, display, ...
Est-ce que c'est possible ?
Merci d'avance,
Yannick
Bonjour,
Je souhaiterais mettre en place le tableau suivant en CSS en utilisant 4 styles seulement.
Je ne veux pas utiliser de top, left, mais seulement des float, display, ...
Est-ce que c'est possible ?
Merci d'avance,
Yannick
Bah si c'est c'est *vraiment* un tableau, mieux vaut utiliser <table>Envoyé par yannickn
Sinon :
- bloc 1 en float left
- bloc 4 en float right
- blocs 2 et 3 laissés dans le flux courant, avec des marges à gauche et droite.
Salut, tu peux faire ça
Testé sous FF 1.0.7 et IE 6.0
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 <html> <head> <style type="text/css"> body { margin: 0; } #blocLeft { float: left; width: 30%; height: 100%; background-color: red; } #blocCenter { float: left; width: 40%; height: 100%; padding: 0; } #blocRight { float: left; width: 30%; height: 100%; background-color: blue; } #blocTop { width: 100%; height: 50%; background-color: green; } #blocBottom { width: 100%; height: 50%; background-color: yellow; } </style> </head> <body> <div id="blocLeft"> bloc1 </div> <div id="blocCenter"> <div id="blocTop"> bloc2 </div> <div id="blocBottom"> bloc3 </div> </div> <div id="blocRight"> bloc4 </div> </body> </html>
Bon développement ;-)
+1 j'aurais fait exactement la meme chose![]()
comme ci-dessus mais en enlevant la boite centre :
testé sous FF
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 <html> <head> <style type="text/css"> body{ margin: 0; } #blocLeft{ float: left; width: 30%; height: 100%; background-color: red; } #blocRight{ float: right; width: 30%; height: 100%; background-color: blue; } #blocTop{ height: 50%; background-color: green; } #blocBottom{ height: 50%; background-color: yellow; } </style> </head> <body> <div id="blocLeft"> boite gauche </div> <div id="blocRight"> boite droite </div> <div id="blocTop"> boite centrehaut </div> <div id="blocBottom"> boite centrebas </div> </body> </html>
Merci beaucoup, cela répond parfaitement a ma question !
Yannick
Partager