Bonsoir à tous,

Je débute des cours en ligne dans le html5/css3 et je suis bloqué sur le positionnement d'un div au centre,
le div central (centre) est bien aligné 15px à droite du div gauche mais pas du div droite et lors d'un redimensionnement le div droite chevauche sur le div centre.

Je souhaiterais que le centre ce redimensionne automatiquement à 15px à gauche du droite sans qu'il ce chevauche mais je bloque, voici le code css :

Code css : 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
body{
	background-image: url("../images/fd.png");
	color: white;
}
a{
   text-decoration: none;
   color: grey;
}
a:hover{
   text-decoration: underline;
   font-style: oblique;
   color: orange;
}
h1{
	font-size: 16px;
	font-family: "Comic Sans MS", "Arial Black", Impact, Arial, Verdana;
	letter-spacing:1px;
	word-spacing:7px;
	padding-left: 30px;
	padding-top: 6px;
	padding-bottom: 8px;					
	background-color: rgba(105, 105, 105, 0.3);
}
#banniere_image{
    margin-top: 15px;
    margin-left: 20px;
    height: 100px;
    background: url('../images/logo.png') no-repeat;
    position: relative;
    opacity: 0.6;
}
.container { 
	display: inline-block;
	right: 30px;
	margin-top: 0px; 
	margin-right: 30px;
	position: fixed;
}
#content form input[type="text"], #content form input[type="password"]{
	color: orange;
	font-size: 13px;
	font-weight: bold;
	font-family: Impact, "Comic Sans MS", "Arial Black", Arial, Verdana;
	background-color: black;
	border: 1px grey solid;
}
#container2{
	width:100%;
}
#gauche {
    float: left;
	width: 270px;
	height: 318px;
	background-color: rgba(105, 105, 105, 0.1);
	margin-top: 60px;
    margin-left: 70px; 
    margin-right: 30px;
    border: 1px grey dotted;
    border-color: rgba(105, 105, 105, 0.5);
}
iframe{
    margin-top: 15px;
    margin-left: 15px;
}
#droite{
    float: right;
	width: 270px;
	height: 318px;
	background-color: rgba(105, 105, 105, 0.1);
	margin-top: 60px;
    margin-left: 30px; 
    margin-right: 70px;
    border: 1px grey dotted;
    border-color: rgba(105, 105, 105, 0.5);
}
#centre{
	display: inline-block;
	width: ...;
	height: 210px;
	background-color: rgba(105, 105, 105, 0.1);
	margin-top: 60px;
	padding-left: 15px;
    padding-right: 15px; 
    position:absolute;
    border: 1px grey dotted;
    border-color: rgba(105, 105, 105, 0.5);
}
#centre, p{
	font-size: 14px;
	font-family: "Comic Sans MS", "Arial Black", Impact, Arial, Verdana;
	letter-spacing:1px;
	margin-left: 15px;
	color: grey;
}

Edit :
Citation Envoyé par laurentSc Voir le message
J'anticipe une question que tu ne vas tarder à avoir de la part des experts : donne ton code html...
Merci de m'avoir prévenu :) Voici le code html :

Code html : 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
<!DOCTYPE html>
<html lang="en">
<html>
    <head>
        <meta charset="utf-8" />
        <link rel="stylesheet" href="css/style.css" />
        <title>7Oxicity - home</title>
    </head>
    <body>
            <h1>
		<a href="index.html">home</a>
		<a href="register.html">register</a>
		<a href="community.html">community</a>
		<a href="join_7Ox.html">join-7Ox</a>
		<a href="report_cheat.html">report-cheat</a>
	</h1>
        <div id="banniere_image"></div>	
	<div class="container">
	<section id="content">
		<form action="">
			<div>
				<input type="text" placeholder="Username" required="" id="username" /> <input type="password" placeholder="Password" required="" id="password" /> <input type="submit" value="Login" />
			</div>
		</form><!-- form -->
	</section><!-- content -->
</div><!-- container -->
<div class="container2">
	<div id="gauche">
			<iframe src="http://cache.www.gametracker.com/components/html0/?host=78.46.62.88:50000&bgColor=333333&fontColor=CCCCCC&titleBgColor=222222&titleColor=FF9900&borderColor=555555&linkColor=FFCC00&borderLinkColor=222222&showMap=0&currentPlayersHeight=100&showCurrPlayers=1&showTopPlayers=0&showBlogs=0&width=240"frameborder="0" scrolling="no" width="240" height="288"></iframe>
	</div>
	<div id="droite">
	</div>
	<div id="centre">
		<p>Chatbox</p>
	</div<
</div<<!-- container2 -->
</body>
</html>