Hallo Community,
habe erfolgreich ein Superfish Menu eingerichtet. Dummerweise wird dies in manchen Situationen (bzw Browsern) umgebrochen, was natürlich nicht sein darf.
Zu finden ist das ganze hier :
http://www.psychotherapie-schicktanz.de
Hier ein paar meiner Files:
main.tmpl (für Aufbau der Seite)
<div id="main">
<div id="header-wrapper">
<div id="header"></div>
</div>
<div id="menu-wrapper">
<div class="my-sticky-element">###MENU###</div>
</div>
<div id="teaser-wrapper">
<div id="banner2"></div>
<div id="extra-bar">
<div id="link">###LINK###</div>
</div>
</div>
<div id="content-wrapper">
<div id="content-all">
<div id="sidebar">###SIDEBAR###</div>
<div id="content">###CONTENT###</div>
</div>
</div>
<div id="push">
</div>
</div>
<div id="footer-wrapper">
<div id="footer">
<span class="text1">###FOOTER###</span>
<span class="text3">###FOOTER3###</span>
<span class="text2">###FOOTER2###</span>
</div>
</div>
framework.css, haupt-css
@import url(http://fonts.googleapis.com/css?family=Open+Sans:400,400italic,700,300);
* {
margin:0;
padding:0;
border:0;
font-family:'Open Sans',sans-serif;
}
html,body {
height:100%;
margin:0;
padding:0;
}
body {
/* Schriftgrösse Inhalt */
font-size:.85em;
background-color:#FFFDEA;
/* Folgender Code deaktiviert das Auswählen / Markieren von Inhalt */
user-select: none;
-moz-user-select: none;
-webkit-user-select: none;
-o-user-select: none;
}
/* ################### Main ################### */
#main {
min-height: 100%;
height: auto !important;
height: 100%;
margin: 0 auto -75px;
width:100%;
text-align:center;
background:#FFFDEA; /* Hintergrund hellgelb */
color:#666666; /* Schriftfarbe dunkelgrau */
}
/* ################### Header ################### */
#header-wrapper {
overflow:hidden;
height:200px; /* damit Platz ist für den "menu-wrapper", der muss ja noch über dem "teaser-wrapper" reinpassen */
z-index:12;
}
#header {
background:url('../images/header.png') #fffdea;
background-repeat:no-repeat;
display: block;
height: 125px;
margin: 20px auto;
padding: 25px 0 0 10px;
text-align: left;
width: 940px;
}
/* ################### Menu, sticky beim scrollen ################### */
.my-sticky-element.stuck {
position:fixed;
top:0;
z-index:150;
}
#menu-wrapper{
position:absolute;
width:940px; /* Ganze Seitenbreite nutzen für das Menu */
top:140px; /* wegen Header Grösse muss es "top:" nach unten rutschen */
left:50%;
margin:0 0 0 -480px;
overflow:visible;
height: 42px; /* So hoch ist das Menu grad */
}
/* ################### Teaser / Banner / Box ################### */
#teaser-wrapper{
height: 219px;
margin: 0 auto;
overflow: hidden;
padding: 0;
text-align: center;
width: 960px;
z-index: 6;
position: relative;
}
#banner2 { /* Bild unter dem Menu, über dem Content, ganze Seitenbreite */
background: url("/fileadmin/template/images/teaser-portrait2.jpg") no-repeat scroll 0 0 #D8D1C3;
height: 210px;
position: relative;
width: 700px;
float:left;
overflow:hidden;
border-radius:5px;
text-align:left;
}
#teaser img {
position: absolute;
left:0;
top:0;
float:left;
border-radius:5px;
}
#extra-bar {
height: 210px;
position: relative;
width:220px;
padding:10px;
background: url("/fileadmin/template/images/box.jpg") no-repeat;
float:right;
}
#link {
position:absolute;
z-index:50;
top:150px;
}
/* ################### Haupt-Content ################### */
#content-wrapper {
text-align:left;
margin: 0 auto;
width:940px;
position:relative;
z-index:2;
}
#content_all {
padding: 0 0 30px;
}
#content {
float: left;
padding: 20px 0 0;
width: 680px;
}
/* ### Sidebar im Haupt-Content ### */
#sidebar {
float:right;
width: 230px;
padding: 20px 0 0 0;
}
#sidebar .csc-textpic-clear {
height:30px;
}
#sidebar ul {
padding-left : 15px;
margin-left : 0;
}
#sidebar li {
padding-left : 0;
margin-left : 0;
text-align: left;
}
/* ################### Push Platzhalter zur Fussleiste ################### */
#push {
height: 95px;
clear:both;
}
/* ################### Footer ################### */
#footer-wrapper {
font-size:12px;
color: #FFFDEA;
background: url("/fileadmin/template/images/bg_footer.png") repeat-x scroll center 0 transparent;
display:block;
height: 55px;
margin: 0 auto;
overflow: hidden;
width: 960px;
line-height:1.4em;
border-radius: 5px;
}
#footer-wrapper a {
color: #633163;
text-decoration:none;
}
#footer-wrapper a:hover {
color: #633163;
text-decoration:underline;
}
#footer-text a {
text-decoration:underline;
}
#footer-text a:hover {
text-decoration:none;
}
#footer {
width:940px;
height: 37px;
display:block;
margin: 0 auto;
padding-left: 20px;
padding-top: 18px;
text-align: left;
}
#footer ul {
list-style-type : none;
margin : 18px 0 0;
padding : 0;
}
superfish.css
/*** ESSENTIAL STYLES ***/
.sf-menu, .sf-menu * {
margin: 0; /* Abstand zwischen Menubuttons */
padding: 0; /* Blockgrösse der Menubuttons */
list-style: none;
}
.sf-menu li {
position: relative; /* muss */
min-width:149px; /* Mindestbreite Menuitems, geht für Chrome, Firefox braucht 151 für ganze Breite */
}
.sf-menu ul {
position: absolute; /* sonst verschiebt sich inhalt wenn Menu aufgeht */
display: none;
top: 100%;
left: 0;
z-index: 99;
}
.sf-menu > li {
float: left; /* center macht es untereinander */
}
.sf-menu li:hover > ul,
.sf-menu li.sfHover > ul {
display: block;
}
.sf-menu a {
display: block;
position: relative;
}
.sf-menu ul ul {
top: 0;
left: 100%;
}
/*** DEMO SKIN ***/
.sf-menu {
float: left;
margin-bottom: 1em;
}
.sf-menu ul {
box-shadow: 2px 2px 6px rgba(0,0,0,.2); /* Richtung nach rechts/unten/allgemeineAusdehnung; Schatten hinter dem ausklappbaren Submenu */
min-width: 12em; /* allow long menu items to determine submenu width */
*width: 12em; /* no auto sub width for IE7, see white-space comment below */
}
.sf-menu a { /* Ränderfarben um die Menuboxen*/
border-left: 1px solid #ffffff;
border-top: 1px solid #ffffff; /* fallback colour must use full shorthand */
border-top: 1px solid rgba(255,255,255,.5);
padding: .75em 1em;
text-decoration: none;
zoom: 1; /* IE7 */
}
.sf-menu a { /* Textfarbe der Menupunkte */
color: #FFFFFF; /* ev. grau 666666, das ist schlecht lesbar */
font-size: 1em;
}
.sf-menu li { /* Hintergrund des Menus, normal */
background: #cccc99; /* Blassgrün von Petra */
white-space: nowrap; /* no need for Supersubs plugin */
*white-space: normal; /* ...unless you support IE7 (let it wrap) */
-webkit-transition: background .2s;
transition: background .2s;
}
.sf-menu ul li { /* Hintergrund Untermenupunkte, normal */
background: #cccc99;
}
.sf-menu ul ul li { /* Unbekannt wofür das ist, dunkleres Hellblau */
background: #9AAEDB;
}
.sf-menu li:hover,
.sf-menu li.sfHover { /* Hover für Menu und Submenu */
background: #666633;
/* only transition out, not in */
-webkit-transition: none;
transition: none;
}
/*** arrows (for all except IE7) **/
.sf-arrows .sf-with-ul {
padding-right: 2.5em;
*padding-right: 1em; /* no CSS arrows for IE7 (lack pseudo-elements) */
}
/* styling for both css and generated arrows */
.sf-arrows .sf-with-ul:after {
content: '';
position: absolute;
top: 50%;
right: 1em;
margin-top: -3px;
height: 0;
width: 0;
/* order of following 3 rules important for fallbacks to work */
border: 5px solid transparent;
border-top-color: #dFeEFF; /* edit this to suit design (no rgba in IE8) */
border-top-color: rgba(255,255,255,.5);
}
.sf-arrows > li > .sf-with-ul:focus:after,
.sf-arrows > li:hover > .sf-with-ul:after,
.sf-arrows > .sfHover > .sf-with-ul:after {
border-top-color: white; /* IE8 fallback colour */
}
/* styling for right-facing arrows */
.sf-arrows ul .sf-with-ul:after {
margin-top: -5px;
margin-right: -3px;
border-color: transparent;
border-left-color: #dFeEFF; /* edit this to suit design (no rgba in IE8) */
border-left-color: rgba(255,255,255,.5);
}
.sf-arrows ul li > .sf-with-ul:focus:after,
.sf-arrows ul li:hover > .sf-with-ul:after,
.sf-arrows ul .sfHover > .sf-with-ul:after {
border-left-color: white;
}