Bonjour à tous,
Pour centrer une div dans une autre, j'ai utilisé des margin auto à gauche et à droite.
Dans Firefox ça marche mais ce n'ai pas le cas dans Internet Explorer
Une solution ?
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 <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <style> body{ direction: ltr; font-family: Tahoma; font-size: 12px; background-color: #000; } .main{ width: 75%; margin-left: auto; margin-right: auto; position: relative; background-color: #333; border: 1px dashed #CCC; } .content{ width: 65%; margin-left: auto; margin-right: auto; position:relative; background-color: #FFF; border: 1px dashed #CCC; } </style> </head> <body> <div class="main"> <div class="content"></div> </div> </body> </html>
Merci.
Partager