DW "Positionierung von horizontaler Spry Menüleiste"

vielen dank
(für mich schon, ich bin Anfänger)
zum Verständnis: wie kommst Du auf diesen Wert von 4.65 em ?
hab das mal mit 6 em probiert und geht auch - warum gerade 4.65
 
vielen dank Maik
ich hab noch ein wenig "rumgespielt"
- und es funktioniert ALLES
eine letzte Frage dazu
das Menu liegt in einem div: nav
ul.MenuBarHorizontal li: float: right;
jetzt würde ich gerne das gesamte Menü um 20 Pixel nach links verschieben
Hab dazu gelesen dass man hierfür das übergeordnete div verschieben sollte
das will ich aber nicht, weil in diesem div ein Hintergrundbild liegt welches nicht verschoben werden soll.
 
Brauchst das umschliessende DIV auch nicht zu verschieben :)
CSS:
ul.MenuBarHorizontal
{
        margin: 0 20px 0 0; /* Außenabstand oben - rechts - unten - links */
        padding: 0;
        list-style-type: none;
        font-size: 90%;
        cursor: default;
        width: auto;
}

mfg Maik
 
tausend Dank nochmal
ich hatte das auch, nur bei "Anwenden" hatte er dies nicht gleich gezeigt und so dachte dass es wohl nicht richtig sei.
Man kann sich wohl darauf nicht verlassen
Gruss
 
Oder einfach mal zwischendurch den Browsercache leeren, damit beim nächsten Seitenaufruf die neuen Files geladen werden ;)

mfg Maik
 
so, hallo Maik, nochmal was
Text im menu mittig - text im Untermenu links
hab dieses durchgemacht
http://livedocs.adobe.com/en_US/Spr...t=WS895F3A6D-6D73-42ef-B568-3D04ABD2F171.html
und das angeschaut
http://labs.adobe.com/technologies/spry/samples/menubar/CenteringHorizontalMenuBarSample.html
da steht das ja eigentlich gut beschrieben drin
aber es funktioniert bei mir nicht
css anbei
was mach ich da falsch ?
Code:
@charset "UTF-8";

/* SpryMenuBarHorizontal.css - version 0.6 - Spry Pre-Release 1.6.1 */

/* Copyright (c) 2006. Adobe Systems Incorporated. All rights reserved. */

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

 LAYOUT INFORMATION: describes box model, positioning, z-order

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

/* The outermost container of the Menu Bar, an auto width box with no margin or padding */
/*ul.MenuBarHorizontal
{
	list-style-type: none;
	font-size: 85%;
	cursor: default;
	width: auto;
	padding-top: 0px;
	padding-right: 0px;
	padding-bottom: 0px;
	padding-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	margin-left: 0px;
}*/

ul.MenuBarHorizontal
{
	list-style-type: none;
	font-size: 85%;
	cursor: default;
	width: auto;
	margin-top: 0px;
	margin-right: 40px;
	margin-bottom: 0px;
	margin-left: 0px;
	padding-top: 2px;
	padding-right: 0px;
	padding-bottom: 0px;
	padding-left: 0px;
}


/* 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
{
	list-style-type: none;
	font-size: 100%;
	position: relative;
	text-align: left;
	cursor: pointer;
	width: 6em;
	float: right;
	padding-top: 0px;
	padding-right: 0px;
	padding-bottom: 0px;
	padding-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	margin-left: 0px;
}
/* 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
{
	list-style-type: none;
	font-size: 100%;
	z-index: 1020;
	cursor: default;
	width: 7em;
	position: absolute;
	left: -1000em;
	padding-top: 0;
	padding-right: 0;
	padding-bottom: 0;
	padding-left: 0;
	margin-top: 0;
	margin-right: 0;
	margin-bottom: 0;
	margin-left: 0;
}
/* 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;
}
/* Menu item containers are same fixed width as parent */
ul.MenuBarHorizontal ul li
{
	float: none;
	width: 7em;
}
/* 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: auto;
	top: 0;
}

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

 DESIGN INFORMATION: describes color scheme, borders, fonts

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

/* Submenu containers have borders on all sides */
ul.MenuBarHorizontal ul
{
	margin-top: -4px;
	margin-left: 6px;
	border: thin solid #FC3;
}
/* Menu items are a light gray block with padding and no text decoration */
ul.MenuBarHorizontal a
{
	display: block;
	cursor: pointer;
	background-color: #FCF6E8;
	color: #333;
	text-decoration: none;
	text-align: center;   /*text in allen Menus steht auf CENTER*/
	padding-top: 0.5em;
	padding-right: 0.75em;
	padding-bottom: 0.5em;
	padding-left: 0.75em;
}


/* 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: #33C;
	color: #FFF;
}
/* 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: #F90;
	color: #FFF;
}

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

 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
{
}
/* 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
{
}
/* 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
{
}
/* 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
{
	text-align: left;  /* */
}

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

 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;
	}
}
 
Mahlzeit :)

In deinem Stylesheet fehlt der fettmarkierte Selektor:
Code:
/* Center the text within all menu item links.
 */
ul.MenuBarHorizontal a {
	text-align: center;
}
/* Set the the alignment back to left for any
 * menu item links that are in a sub menu.
 */
ul.MenuBarHorizontal ul a {
	text-align: left;
}


mfg Maik
 
wieder mal DANKE

Verständnisfrage
wie kommt man denn darauf so eine Regel neu zu machen ?
ich versuche das so
entsprechendes css markieren, dann darauf "neue Regel erstellen" anwenden
welche css spry Regel hätte ich denn da nehmen müssen ?

habs mit
ul.MenuBarHorizontal ul a.MenuBarItemSubmenu
funktioniert aber nicht

oder ist da mein Ansatz falsch ?
 
Um eines vorweg zu nehmen, ich nutze Dreamweaver überhaupt nicht ;-)
habs mit
ul.MenuBarHorizontal ul a.MenuBarItemSubmenu
funktioniert aber nicht
Dann besitzen bei dir die Links der Submenüs im HTML-Code vermutlich nicht die Klasse MenuBarItemSubmenu, denn bei mir funktioniert es so einwandfrei:
Code:
<ul class="MenuBarHorizontal">
    <li><a href="#">link 1</a></li>
    <li><a href="#">link 2</a></li>
    <li><a href="#">link 3</a></li>
    <li><a href="#">link 4</a>
           <ul>
               <li><a href="#" class="MenuBarItemSubmenu">sub 4.1</a></li>
           </ul>
    </li>
</ul>
CSS:
ul.MenuBarHorizontal ul a.MenuBarItemSubmenu
{
        text-align: left;   
}

mfg Maik
 
Zurück