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 19/04/2011, 12h27   #1
Invité de passage
 
Inscription : avril 2011
Messages : 1
Détails du profil
Informations forums :
Inscription : avril 2011
Messages : 1
Points : 0
Points : 0
Par défaut Problème d'affichage avec IE + problème de bordure du menu Spry

Bonjour à tous,

Voici mes soucis :
- j'ai créé une barre de menu Spry avec Dreamweaver CS5 mais elle ne se place pas au bon endroit sous IE (elle va en haut de la page) alors que sous Mozilla ça marche. Comment faire ? Créer deux feuilles de style ?..
Au passage, j'utilise la version 7 d'IE, la version 4.0 de Firefox et je suis sous Windows XP (malheureusement).

- mon menu est composé de dix rubriques (pas de sous-rubriques) et j'aimerai mettre une bordure (à droite) de chaque rubrique mais quand je mets cela : border-right: 1px solid #333; la dixième rubrique passe au dessous. Comment avoir une bordure fine et mes dix rubriques sur une seule ligne?

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<!-- menu -->  
 
<ul id="MenuBar1" class="MenuBarHorizontal">  
  <li><a href="#">Monts et <br/> ports</a></li>  
  <li><a href="#">Une civilisation <br/> pyrénéenne</a></li>  
  <li><a href="#">Réseaux <br/>   
    médiévaux</a></li>  
  <li><a href="#">Genèse et particularités <br/>   
    d'une frontière</a></li>  
  <li><a href="#">Frontière <br/> lieu de danger</a></li>  
  <li><a href="#">Frontière <br/> porte du salut</a></li>  
  <li><a href="#">Liens <br/> économiques</a></li>  
  <li><a href="#">Peuple de <br/>   
    la frontière</a></li>  
  <li><a href="#">Vision <br/> de l'autre</a></li>  
  <li><a href="#">La frontière <br/> aujourd'hui</a></li>  
</ul>


Le 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
124
125
126
127
128
129
130
131
132
133
134
/* 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: none;  
    font-size: 100%;  
    cursor: default;  
}  
/* Set the active Menu Bar with this class, currently setting z-index to accomodate IE rendering bug:  <a href="http://therealcrisp.xs4all.nl/meuk/IE-zindexbug.html" target="_blank">http://therealcrisp.xs4all.nl/meuk/IE-zindexbug.html</a>  */  
ul.MenuBarActive  
{  
    z-index: 1000;  
    border: #E6E6E6;  
}  
/* Menu item containers, position children relative to this container and are a fixed width */  
ul.MenuBarHorizontal li  
{  
    margin: 0;  
    padding: 0;  
    list-style-type: none;  
    font-size: 100%;  
    position: relative;  
    text-align: center;  
    font-family: "Arial Black", Gadget, sans-serif;  
    font-size:13px;  
    cursor: pointer;  
    float: left;  
    left: 4px;  
    top: 78px;  
    border-right: 1px solid #333;      
}  
 
 
/* Menu item containers are same fixed width as parent */  
ul.MenuBarHorizontal ul li  
{  
    width: 8.2em;  
}  
 
/*******************************************************************************  
 
 DESIGN INFORMATION: describes color scheme, borders, fonts  
 
 *******************************************************************************/  
 
/* Submenu containers have borders on all sides */  
ul.MenuBarHorizontal ul  
{  
    border: 4px solid #CCC;  
}  
/* Menu items are a light gray block with padding and no text decoration */  
ul.MenuBarHorizontal a  
{  
    display: block;  
    cursor: pointer;  
    background-color: #FFF;  
    padding: 0.5em 0.75em;  
    color: #3D93AA;  
    text-decoration: none;  
    text-align: center;  
    font-family:Georgia, "Times New Roman", Times, serif;  
}  
/* 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: #E6E6E6;  
    color: #62843A;  
}  
/* 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: #E6E6E6;  
    color: #62843A;  
}  
 
/*******************************************************************************  
 
 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%;  
}  
/* 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;  
    }  
}
elo1234 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 19/04/2011, 18h53   #2
Modérateur
 
Avatar de NoSmoking
 
Homme
Inscription : janvier 2011
Messages : 2 933
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : France, Isère (Rhône Alpes)

Informations forums :
Inscription : janvier 2011
Messages : 2 933
Points : 4 756
Points : 4 756
Bonjour,
les LI sont en float:left d'où lorsqu'il n'y a plus de place il passe à la ligne.
Mets une largeur au contenant UL.
NoSmoking est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 06h37.


 
 
 
 
Partenaires

Hébergement Web