Antworten auf deine Fragen:
Neues Thema erstellen

Antworten zum Thema „Problem bei Spry Horizontal Bar CSS“

Gambler007

Noch nicht viel geschrieben

Hallo zusammen,
sitzen imoment an einem kleinen Webprojekt und hänge an der Navi leiste fest. Es soll eine Horizontale Spry Bar werden. Problem ist nur das aus mir unerklärlichen Gründen die leiste nicht senkrecht nach unten aufklappt wie normalerweise, sonder sich unterhalb der Navi leiste waagerecht aufklappt (siehe screen). Anbei auch der Code...
Yfrog Image : yfrog.com/75unbenannt2kij - Uploaded by Gambler1177

Code:
ul.MenuBarHorizontal
{
margin: 0 0 75% 100%;
padding: 0;
list-style-type: none;
font-size: 12px;
cursor: default;
width: auto;
color: #666;
background-color: #644530;
}
/* Set the active Menu Bar with this class, currently setting z-index to accomodate IE rendering bug: */
ul.MenuBarActive
{
z-index: 1000;
color: #000;
background-color: #000;
}
/* Menu item containers, position children relative to this container and are a fixed width */
ul.MenuBarHorizontal li
{
padding: 5;
list-style-type: none;
font-size: 12px;
position: inherit;
text-align: left;
width: 9em;
float: left;
font-family: Georgia, "Times New Roman", Times, serif;
color: #FFF;
height: 50px;
margin-top: 0;
margin-right: 0%;
margin-bottom: 0;
margin-left: 100%;
}
/* 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
{
padding: 0;
list-style-type: none;
font-size: 12px;
z-index: 1020;
width: 105em;
position: relative;
left: -1000em;
background-color: #f0e7d7;
top: auto;
height: auto;
margin-top: 5%;
margin-right: 0;
margin-bottom: 75%;
margin-left: 100%;
}
/* 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: auto;
background-color: #000;
}
/* Menu item containers are same fixed width as parent */
ul.MenuBarHorizontal ul li
{
margin: 0 75% 0 100%
width: 8.2em;
font-family: Georgia, "Times New Roman", Times, serif;
color: #FFF;
}
/* Submenus should appear slightly overlapping to the right (95%) and up (-5%) */
ul.MenuBarHorizontal ul ul
{
position: absolute;
margin: 0 0 0 100%;
color: #FFF;
}
/* 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: auto;
top: 0;
color: #000;
}

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

DESIGN INFORMATION: describes color scheme, borders, fonts

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

/* Submenu containers have borders on all sides */
ul.MenuBarHorizontal ul
{
margin: 0 0 0 100%
border: 1px solid #CCC;
color: #FFF;
background-color: #FFF;
}
/* Menu items are a light gray block with padding and no text decoration */
ul.MenuBarHorizontal a
{
display: block;
cursor: pointer;
background-color:#f0e7d7;
padding: 0.5em 0.9em;
color:#000
text-decoration: underline;
font-family: Verdana, Geneva, sans-serif;
font-size: 9px;
font-style: normal;
line-height: normal;
font-weight: normal;
}
/* Menu items that have mouse over or focus have a blue background and white text */
ul.MenuBarHorizontal a:hover, ul.MenuBarHorizontal a:focus
{
color: #000;
font-family: Verdana, Geneva, sans-serif;
font-size: 9px;
font-weight: normal;
text-decoration: underline;
}
/* 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
{
color: #000;
}

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

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: none;
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: #000;
}
}
 

CrazyLopp

Hat es drauf

AW: Problem bei Spry Horizontal Bar CSS

Versuch mal aus dem li der 2.Ebene ein Blockelement zu machen
Code:
li {
   display: block;
}

Dadurch sollte sich deine Navigation vertikal aufklappen (2. Ebene)


Beste Grüße,
Crazylopp
 

Gambler007

Noch nicht viel geschrieben

AW: Problem bei Spry Horizontal Bar CSS

du meinst ul.MenuBarHorizontal ul li
und da dann einfach mal ein Block element drauf hauen? wie meinst du das?

Edit: ah ok mein browser hatte problem deine code Fenster zu öffnen. Hab ich gemacht ändert sich leider nichts...
 
Zuletzt bearbeitet:

CrazyLopp

Hat es drauf

AW: Problem bei Spry Horizontal Bar CSS

Wenn das die 2. Ebene (=Submenu) ist dann ja, also so:

Code:
ul.MenuBarHorizontal ul li {
   display: block;
   ...der restliche Code...
}
 

Gambler007

Noch nicht viel geschrieben

AW: Problem bei Spry Horizontal Bar CSS

mhmm klappt nicht... das block element ist ja eig. schon da wo es hingehört (ul.MenuBarHorizontal a) beim Mouseover soll sich ja das Menü nach unten hin öffnen.
 
Bilder bitte hier hochladen und danach über das Bild-Icon (Direktlink vorher kopieren) platzieren.
Antworten auf deine Fragen:
Neues Thema erstellen

Willkommen auf PSD-Tutorials.de

In unseren Foren vernetzt du dich mit anderen Personen, um dich rund um die Themen Fotografie, Grafik, Gestaltung, Bildbearbeitung und 3D auszutauschen. Außerdem schalten wir für dich regelmäßig kostenlose Inhalte frei. Liebe Grüße senden dir die PSD-Gründer Stefan und Matthias Petri aus Waren an der Müritz. Hier erfährst du mehr über uns.

Stefan und Matthias Petri von PSD-Tutorials.de

Nächster neuer Gratisinhalt

03
Stunden
:
:
25
Minuten
:
:
19
Sekunden

Flatrate für Tutorials, Assets, Vorlagen

Statistik des Forums

Themen
175.158
Beiträge
2.581.872
Mitglieder
67.225
Neuestes Mitglied
Petra
Oben