Bin verzweifelt. Habe es wunderbar geschafft mein Menu beim Scrollen der Seite immer am oberen Rand festkleben zu lassen.
Dann habe ich meinen TypoScript und CSS Code bissel aufgeräumt und nun gehts gar nicht mehr. Ich hab schon alles nachgeschaut, ich finde den Fehler nicht.
Meine Seite ist hier: http://mobile.psychotherapie-schicktanz.de
Die Anleitung habe ich hier her: http://imakewebthings.com/jquery-waypoints/shortcuts/sticky-elements
Ich bin grad echt verzweifelt, vor allem weil ich es nach 2 Tagen endlich geschafft hatte :-(
Laut Quellcode siehts aber so aus als würde alles korrekt geladen...
Meine Template-Datei:
<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>
</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 id="footer-wrapper">
<div id="footer">
###FOOTER###
###FOOTER2###
</div>
</div>
Mein TS (Auszug):
# Page title
page.headerData {
5 = TEXT
5.field = title
5.wrap = <title>{$project.WebsiteTitle} – |</title>
60 = TEXT
60.value = <link href='http://fonts.googleapis.com/css?family=Telex' rel='stylesheet' type='text/css'>
2 = TEXT
2.value (
<script>
############################################ Wichtig, Menuleiste ##################################
$(document).ready(function(){
$("ul.sf-menu").supersubs({
minWidth: 12, // minimum width of sub-menus in em units
maxWidth: 27, // maximum width of sub-menus in em units
extraWidth: 1 // extra width can ensure lines don't sometimes turn over
// due to slight rounding differences and font-family
}).superfish(); // call supersubs first, then superfish, so that subs are
// not display:none when measuring. Call before initialising
// containing tabs for same reason.
});
############################################ Wichtig, Menuleiste ##################################
############################################ Menuleiste "sticky" am oberen Bildrand beim scrollen ##################################
$(document).ready(function() {
$('.my-sticky-element').waypoint('sticky');
});
############################################ Menuleiste "sticky" am oberen Bildrand beim scrollen ##################################
</script>
) // closes <script>
} // closes page.headerData
Meine Haupt-CSS:
* {
margin:0;
padding:0;
border:0;
font-family:'MetaWeb','Arial',sans-serif;
}
html,body {
height:100%;
margin:0;
padding:0;
}
body {
/* Schriftgrösse Inhalt */
font-size:.9em;
background-color:#FFFDEA;
}
/* ################### 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 -470px;
overflow:visible;
}
/* ################### 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/700x210.jpg") no-repeat scroll 0 0 #D8D1C3;
height: 210px;
position: relative;
width: 700px;
float:left;
overflow:hidden;
border-radius:5px;
border: 1px solid #FFFDEA; /* #d3cdd3;*/
text-align:left;
}
#teaser img {
position: absolute;
left:0;
top:0;
float:left;
border-radius:5px;
}
#extra-bar {
height: 210px;
position: relative;
padding:10px;
width:220px;
background: url("/fileadmin/template/images/box.jpg") no-repeat scroll 0 0 transparent;
float:right;
}
/* ################### Haupt-Content ################### */
#content-wrapper {
text-align:left;
margin: 0 auto;
width:940px;
padding-left:15px;
position:relative;
z-index:2;
}
#content_all {
padding: 0 0 30px;
}
#content {
float: left;
padding: 20px 0 0;
width: 670px;
}
/* ### Sidebar im Haupt-Content ### */
#sidebar {
float:right;
width: 240px;
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: #353535;
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:960px;
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;
}
#footer .csc-frame-frame1 {
font-style: italic;
}
/* ################### Currently not used ################### */
#home_link a {
text-indent: -999px;
display: block;
position: absolute;
width: 838px;
height: 220px;
margin-top: -130px;
}
#small_buttons {
top:0;
position:absolute;
margin-left:841px;
z-index:101;
}
#small_buttons div {
width:51px;
height:54px;
text-indent:-9999px;
float:left;
margin-right:-10px;
}
#small_buttons div a {
display:block;
width:51px;
height:54px;
outline:none;
}
#small_buttons #facebook_button {
background:url('../images/facebook.png');
}