Menu, différence entre IE et Firefox

WRInaute occasionnel
Est-ce que qqun pourrai m'aider ?

Sur cette page : http://www.horlogerie-suisse.com/Copie%20de%20index.html

Mon menu sur Firefox est OK, à droite
Sur IE mon menu vient se coller à gauche 8O

Il y a un lien qui explique un problème (dans le fichier ci-dessous) me ne résous pas mon bug

Merci d'avance

/* The outermost container of the Menu Bar, an auto width box with no margin or padding */
ul.MenuBarHorizontal
{
margin: 0;
padding: 0;
list-style-type: disc;
font-size: x-small;
cursor: default;
color: #FFF;
font-weight: bold;
}
/* Set the active Menu Bar with this class, currently setting z-index to accomodate IE rendering bug: http://therealcrisp.xs4all.nl/meuk/IE-zindexbug.html */
ul.MenuBarActive
{
z-index: 1000;
}
/* Menu item containers, position children relative to this container and are a fixed width */
ul.MenuBarHorizontal li
{
margin: 1;
padding: 0;
list-style-type: none;
font-size: 12px;
position: relative;
text-align: center;
cursor: pointer;
width: 7.3em;
float: left;
color: #FFF;
border: 8px;
background-color: #000000;
left: 296px;
}
/* Submenus should appear below their parent (top: 0) with a higher z-index, but they are initially off the left side of the screen (-1000em) */
ul.MenuBarHorizontal ul
{
margin: 0;
padding: 0;
list-style-type: none;
font-size: 100%;
z-index: 1020;
cursor: default;
width: 130px;
position: absolute;
left: -1000em;
}
/* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to auto so it comes onto the screen below its parent menu item */
ul.MenuBarHorizontal ul.MenuBarSubmenuVisible
{
left: -296px;
}
/* Menu item containers are same fixed width as parent */
ul.MenuBarHorizontal ul li
{
width: inherit;
}
/* Submenus should appear slightly overlapping to the right (95%) and up (-5%) */
ul.MenuBarHorizontal ul ul
{
position: absolute;
margin: -5% 0 0 95%;
}
/* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to 0 so it comes onto the screen */
ul.MenuBarHorizontal ul.MenuBarSubmenuVisible ul.MenuBarSubmenuVisible
{
left: -296px;
top: 0;
}

/*******************************************************************************

DESIGN INFORMATION: describes color scheme, borders, fonts

*******************************************************************************/

/* Submenu containers have borders on all sides */
ul.MenuBarHorizontal ul
{

}
/* Menu items are a light gray block with padding and no text decoration */
ul.MenuBarHorizontal a
{
display: block;
cursor: pointer;
background-color: #000;
padding: 0.5em 0.5em;
color: #FFF;
text-decoration: none;
}
/* Menu items that have mouse over or focus have a blue background and white text */
ul.MenuBarHorizontal a:hover, ul.MenuBarHorizontal a:focus
{
background-color: #000;
color: #FFF;
font-size: 12px;
width: auto;
text-align: center;
font-family: Arial, Helvetica, sans-serif;
}
/* Menu items that are open with submenus are set to MenuBarItemHover with a blue background and white text */
ul.MenuBarHorizontal a.MenuBarItemHover, ul.MenuBarHorizontal a.MenuBarItemSubmenuHover, ul.MenuBarHorizontal a.MenuBarSubmenuVisible
{
background-color: #000;
color: #06F;
}

/*******************************************************************************

SUBMENU INDICATION: styles if there is a submenu under a given menu item

*******************************************************************************/

/* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */
ul.MenuBarHorizontal a.MenuBarItemSubmenu
{
background-image: url(SpryMenuBarDown.gif);
background-repeat: no-repeat;
background-position: 95% 50%;
color: #FFF;
}
/* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */
ul.MenuBarHorizontal ul a.MenuBarItemSubmenu
{
background-image: url(SpryMenuBarRight.gif);
background-repeat: no-repeat;
background-position: 95% 50%;
}
/* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */
ul.MenuBarHorizontal a.MenuBarItemSubmenuHover
{
background-image: url(SpryMenuBarDownHover.gif);
background-repeat: no-repeat;
background-position: 95% 50%;
}
/* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */
ul.MenuBarHorizontal ul a.MenuBarItemSubmenuHover
{
background-image: url(SpryMenuBarRightHover.gif);
background-repeat: no-repeat;
background-position: 95% 50%;
}

/*******************************************************************************

BROWSER HACKS: the hacks below should not be changed unless you are an expert

*******************************************************************************/

/* HACK FOR IE: to make sure the sub menus show above form controls, we underlay each submenu with an iframe */
ul.MenuBarHorizontal iframe
{
position: absolute;
z-index: 1010;
filter:alpha(opacity:0.1);
}
/* HACK FOR IE: to stabilize appearance of menu items; the slash in float is to keep IE 5.0 from parsing */
@media screen, projection
{
ul.MenuBarHorizontal li.MenuBarItemIE
{
display: inline;
f\loat: left;
background: #FFF;
}
}
 
WRInaute discret
Code:
<span class="texte_news">
      <div id="recherche">
        <form action="https://www.google.com/cse" name="searchbox_007988363005120983038:dvixigmz_-a" class="texte" id="searchbox_007988363005120983038:dvixigmz_-a">
          <br>
          <div align="center">
            <input type="hidden" name="cx" value="007988363005120983038:dvixigmz_-a" />
            <input name="q" type="text" size="30" class="texte" height="18" />

            <input type="submit" name="sa" value="Search" class="texte" height="20" />
            <input type="hidden" name="cof" value="FORID:1" />
          </div>
        </form>
        <script type="text/javascript" src="https://www.google.com/coop/cse/brand?form=searchbox_007988363005120983038%3Advixigmz_-a"></script>
      </div>
    </span>

j'allais te demander si tu avais mis un float à ton div, mais je regarde la structure de ta page et à vrqi dire j'ai du mal à m'y retrouver. Les span doivent se trouver dans les div ou tout autres balise bloc et ne doit pas encadrer les balises bloc comme les div, les p ou bien encore les h1.
Je trouve étonnant que l'affichage soit correcte sous Firefox et safari.
 
WRInaute discret
je n'ais pas IE8 sous mac, mais je vois que sous IE7 c'est pareil

je vois qu'il y a aussi des soucis au niveau des CSS dans ta page.
tu intègre cette feuille de styles

<link href="index.css" rel="stylesheet" type="text/css">

dans laquelle il y a des infos pour la balise a, et juste après (directement dans la page) tu redéfini les attributs de la même balise.

<style type="text/css">
<!--
a:link {
text-decoration: none;
color: #0099FF;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: none;
}
.Style8 {
color: #0099FF;
font-weight: bold;
text-align: left;
}
.Style12 {text-transform: none; display: inline; line-height: 22px; font-weight: normal;}
.Style14 {
font-size: medium;
à mon avis le problème vient de la.

#recherche {
position:absolute;
width:280px;
z-index:3;
left: 10px;
top: 189px;
height: auto;
}

peut être repositionner ton bloc recherche juste avant ton bloc qui contient ton menu et faire un float.

j'aimerais te donner la solution toute crue mais la je doit avouer avoir du mal à m'y retrouver.

sinon j'aime bien ton menu.
 
WRInaute occasionnel
J'ai résolu le problème :D bon, ce n'est sûrement pas ce que vous attendiez en puriste du CSS :lol: mais ça marche
La boite de recherche et le menu dans un tableau (1ligne 2 colonnes) et le menu en absolu et positionnement droit
 
WRInaute discret
effectivement ça fonctionne, bien joué calagane !

par contre il reste un petit soucis sous opéra MAC, mais bon il n'y a pas beaucoup d'utilisateur qui se servent de ce navigateur !
 
Discussions similaires
Haut