Précédent   Forum des professionnels en informatique > Webmasters - Développement Web > CSS
CSS Forum d'entraide sur l'utilisation des feuilles de style CSS. Avant de poster : Cours CSS, FAQ CSS, Galerie CSS
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 01/11/2011, 21h56   #1
Invité de passage
 
Inscription : novembre 2011
Messages : 2
Détails du profil
Informations forums :
Inscription : novembre 2011
Messages : 2
Points : 0
Points : 0
Par défaut Affichage Internet Explorer

Bonjour.

Je suis actuellement en train de créer le site du gite de séjour de mon père et je rencontre un problème d'affichage que je n'arrive pas à régler sur internet explorer (alors que sur les autres navigateurs cela marche parfaitement.. //rectification : à part sur firefox l'affichage n'est pas correct (j'ai testé sur ie et google chrome)//
Je poste ci-joint deux images comparatives entre firefox et ie et mon code html (avec un peu de javascript) et css. Cela fait peut-être beaucoup à la fois, mais si quelqu'un peut m'aider ce serait vraiment bienvenu, merci d'avance.

sous Firefox :




sous Internet explorer :




Mon code html :
Code html :
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link href="css/css3.css" rel="stylesheet" type="text/css" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript">
</script>
 
<script type="text/javascript">
$(document).ready(function(){
var currentPosition = 0;
var slideWidth = 560;
var slides = $('.slide');
var numberOfSlides = slides.length;
// Remove scrollbar in JS
$('#slidesContainer').css('overflow', 'hidden');
// Wrap all .slides with #slideInner div
slides
.wrapAll('<div id="slideInner"></div>')
// Float left to display horizontally, readjust .slides width
.css({
'float' : 'left',
'width' : slideWidth
});
// Set #slideInner width equal to total width of all slides
$('#slideInner').css('width', slideWidth * numberOfSlides);
// Insert controls in the DOM
$('#slideshow')
.prepend('<span class="control" id="leftControl">Clicking moves left</span>')
.append('<span class="control" id="rightControl">Clicking moves right</span>');
// Hide left arrow control on first load
//manageControls(currentPosition);
// Create event listeners for .controls clicks
$('.control')
.bind('click', function(){
// Determine new position
currentPosition = ($(this).attr('id')=='rightControl') ? currentPosition+1 : currentPosition-1;
// Hide / show controls
//manageControls(currentPosition);
// Move slideInner using margin-left
$('#slideInner').animate({
'marginLeft' : slideWidth*(-currentPosition)
});
});
// manageControls: Hides and Shows controls depending on currentPosition
function manageControls(position){
// Hide left arrow if position is first slide
if(position==0){ $('#leftControl').hide() } else{ $('#leftControl').show() }
// Hide right arrow if position is last slide
if(position==numberOfSlides-1){ $('#rightControl').hide() } else{ $('#rightControl').show() }
}
});
 
//<![CDATA[
 
$(document).ready(function () {
 
	//Append a div with hover class to all the LI
	$('#navMenu li').append('<div class="hover"><\/div>');
 
 
	$('#navMenu li').hover(
 
		//Mouseover, fadeIn the hidden hover class	
		function() {
 
			$(this).children('div').stop(true, true).fadeIn('1000');	
 
		}, 
 
		//Mouseout, fadeOut the hover class
		function() {
 
			$(this).children('div').stop(true, true).fadeOut('1000');	
 
	}).click (function () {
 
		//Add selected class if user clicked on it
		$(this).addClass('selected');
 
	});
 
});
 
//]]>
 
</script>
 
</script>
</head>
 
<body>
 
	<div id="container">
   		 <div id="menu">
    		<ul id="navMenu">
	<li><a href="#">Accueil</a></li>
	<li><a href="#">Le gite</a></li>
	<li><a href="#">Les tarifs</a></li>
	<li><a href="#">La région</a></li>
	<li><a href="#">Divers</a></li>
</ul>
 
   		 </div>
 
 
        <div id="contenu">
 
 
    <!-- Slideshow HTML -->
			<div id="slideshow">
 				 <div id="slidesContainer">
   				 	<div class="slide">
      <!-- Content for slide 1 goes here -->
      <img src="images/dom.jpg" width="500" height="250" />		
      				</div>
    				<div class="slide">
      <!-- Content for slide 2 goes here. -->
      <img src="images/Payrac_vu_ciel.jpg" width="500" height="250" />					
      				</div>
   				 	<div class="slide">
      <!-- Content for slide 3 goes here. -->
   				 	</div>
   				 	<div class="slide">
      <!-- Content for slide 4 goes here. -->
    				</div>
  				</div>
			</div>
<!-- Slideshow HTML -->
 
			<div id="info">
 
            </div>
 
        </div>
 
            <div id="footer">
 
<table width="700" border="0" align="left" cellpadding="2" cellspacing="0">
<form action="envoi.php" method="post" enctype="application/x-www-form-urlencoded" name="formulaire">
<tr>
<td colspan="3"><strong>Envoyer un message</strong></td>
</tr>
<tr>
<td><div align="left">Votre nom :</div></td>
<td colspan="2"><input type="text" name="nom" size="45" maxlength="100"></td>
</tr>
<tr>
<td width="17%"><div align="left">Votre mail :</div></td>
<td colspan="2"><input type="text" name="mail" size="45" maxlength="100"></td>
</tr>
<tr>
<td><div align="left">Sujet : </div></td>
<td colspan="2"><input type="text" name="objet" size="45" maxlength="120"></td>
</tr>
<tr>
<td><div align="left">Message : </div></td>
<td colspan="2"><textarea name="message" cols="42" rows="3"></textarea></td>
</tr>
<tr>
<td></td>
<td width="42%"><left>
<input type="reset" name="Submit" value="Réinitialiser le formulaire">
</center></td>
<td width="80%"><left>
<input type="submit" name="Submit" value="Envoyer">
</center></td>
</tr>
</form>
</table>
 
            </div>
 
	</div>    
 
</body>
</html>


Mon code css :

Code :
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
 
/* CSS Document */
 
body{background-color:#609741;background-image:url(../images/fondpage2.png);background-repeat:no-repeat;
background-position:center}
 
#container{width:715px;height:800px;margin-left: auto;
  margin-right:auto;margin-top:285px}
 
#menu{width:140px;height:520px;float:left;}
 
#contenu{overflow:hidden;width:580px;height:520px}
 
#info{width:250px;height:200px;float:left;margin:50px;}
 
#footer{width:715px;height:200px;padding-left:50px;padding-top:20px}
 
 
li{list-style:none;text-decoration:none;margin-left:-40px}
 
#slideshow #slidesContainer {
	margin-top:25px;
	margin-left:40px;
  width:500px;
  height:250px;
  overflow:auto; /* allow scrollbar */
  float:left;
}
 
#slideshow #slidesContainer .slide {
  width:500px; /* reduce by 20 pixels to avoid horizontal scroll */
  height:250px;
}
 
/**
 * Slideshow controls style rules.
 */
.control {
	margin-top:128px;
  display:block;
  width:30px;
  height:30px;
  text-indent:-10000px;
 float:left;
  cursor: pointer;
}
#leftControl {
	margin-right:-50px;
  top:0;
  left:0;
  background-image:url(../images/boutg.png);background-repeat:no-repeat;
}
#rightControl {
	margin-left:10px;
  top:0;
  right:0;
  background-image:url(../images/boutd.png);
 
}
 
#navMenu {
	margin:0; 
	margin-left:54px;
	padding:0;
	list-style:none;	
	font-family:arial;
	text-align:center;
	line-height:60px;
}
 
	#navMenu li {
		float:left;	
 
		/* default background image	*/
		background:url(../images/default.png) no-repeat center center;	
 
		/* width and height of the menu item */
		width:120px;							
		height:70px;
 
		/* simulate pixel perfect using border */
 
		/* must set it as relative, because .hover class top and left with absolute position will be positioned according to li.	*/
		position:relative;			
	}
 
	#navMenu li a {
		/* z-index must be higher than .hover class */
		z-index:20;	
		text-decoration:none;			
 
		/* display as block and set the height according to the height of the menu to make the whole LI clickable	*/
		display:block;	
		height:70px;
		font-weight:bold;
		position:relative;
		color:#000;
	}
 
 	#navMenu li .hover {
 		/* mouseover image	*/
		background:url(../images/over.png) no-repeat center center;		
 
		/* must be postion absolute 	*/
		position:absolute;	
 
		/*	width, height, left and top to fill the whole LI item	*/
		width:120px;	
		height:70px;
		left:0; 
		top:0;	
 
		/* display under the Anchor tag	*/
		z-index:0;		
 
		/* hide it by default	*/
		display:none;	
	}	
 
	#navMenu li.selected {
		/* selected image	*/
		background:url(../images/selected.png) no-repeat center center;	
	}
Nekogaki est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 02/11/2011, 11h24   #2
Membre éprouvé
 
Avatar de oceane751
 
Intégrateur Web
Inscription : novembre 2004
Messages : 992
Détails du profil
Informations personnelles :
Localisation : France, Paris (Île de France)

Informations professionnelles :
Activité : Intégrateur Web

Informations forums :
Inscription : novembre 2004
Messages : 992
Points : 434
Points : 434
est ce qu'il serait possible d'avoir une url? plus facile pour tester...
oceane751 est déconnecté   Envoyer un message privé Réponse avec citation 10
Vieux 02/11/2011, 12h05   #3
Modérateur
 
Avatar de NoSmoking
 
Homme
Inscription : janvier 2011
Messages : 2 944
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : France, Isère (Rhône Alpes)

Informations forums :
Inscription : janvier 2011
Messages : 2 944
Points : 4 776
Points : 4 776
Bonjour,
agrandis la largeur de la DIV container, 720px par exemple.
NoSmoking est déconnecté   Envoyer un message privé Réponse avec citation 10
Vieux 02/11/2011, 15h48   #4
Invité de passage
 
Inscription : novembre 2011
Messages : 2
Détails du profil
Informations forums :
Inscription : novembre 2011
Messages : 2
Points : 0
Points : 0
Merci beaucoup, c'était tout à fait ça, maintenant l'affichage est correct sur tous les navigateurs.
Nekogaki est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité Cette discussion est résolue.
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 12h38.


 
 
 
 
Partenaires

Hébergement Web