Hallo,
Also ich bastle gerade an einer Seite in der ich das CSS Dropdownmenu verwenden möchte.
Jetzt hab ich es soweit, daß es im Firefox und im IE 7 problemlos funktioniert.
Leider siet es mit IE 5.5 und IE 6 sowie mit Opera ganz schlecht aus!
Hier lassen sich teilweise die unterpunkte gar nicht erreichen.
Anschauen könnt Ihr euch das unter:http://www.siw-typo3.de/
Das ist meine TYPO3 Testumgebung 🙂
Hier noch mein CSS:
(Ich muss dazusagen, daß ich das mit den CSS-Hacks nicht wirklich verstehe und einfach mal intuitiv herumprobiert habe)
/* ================================================================
This copyright notice must be untouched at all times.
The original version of this stylesheet and the associated (x)html
is available at http://www.cssplay.co.uk/menus/final_drop.html
Copyright (c) 2005-2007 Stu Nicholls. All rights reserved.
This stylesheet and the assocaited (x)html may be modified in any
way to fit your requirements.
=================================================================== */
#pmenu {
display:block;
z-index:200;
margin: 0;
padding: 0;
font-size: 12px;
}
/* remove all the bullets, borders and padding from the default list styling */
#pmenu ul {
padding:0;
margin:0;
list-style-type:none;
}
#pmenu ul ul {
width:106px;
}
/* float the list to make it horizontal and a relative positon so that you can control the dropdown menu positon */
#pmenu li {
padding:0;
margin:0;
float:left;
width:106px;
position:relative;
}
/* style the links for the top level */
#pmenu a, #pmenu a:visited {
display:block;
font-size:12px;
text-decoration:none;
color:#fff;
width:100px;
height:20px;
border-left: #ffffff 1px solid;
background: url(../img/nav_d_bg.jpg) repeat-x;
padding-left:7px;
line-height:1.7em;
}
/* a hack so that IE5.5 faulty box model is corrected */
* html #pmenu a, * html #pmenu a:visited {
width:106px;
w\idth:95px;
}
/* style the second level background */
#pmenu ul ul a.drop, #pmenu ul ul a.drop:visited {
background:#DCA603 url(../img/ifsub.gif) bottom right no-repeat;
}
/* style the second level hover FOR IE 5.5 & 6*/
#pmenu ul ul a.drop:hover{
background:#669B08 url(../img/ifsub2.gif) bottom right no-repeat;
}
/* style the second level hover FOR THE REST/
#pmenu ul ul :hover > a.drop {
background:#669B08 url(../img/ifsub2.gif) bottom right no-repeat;
}
/* style the third level background */
#pmenu ul ul ul a, #pmenu ul ul ul a:visited {
background:#DCA603;
}
/* style the third level hover */
#pmenu ul ul ul a:hover {
background: url(../img/nav_a_bg.jpg) repeat-x;
}
/* hide the sub levels and give them a positon absolute so that they take up no room */
#pmenu ul ul {
visibility:hidden;
position:absolute;
height:0;
top:20px;
left:0;
width:150px;
}
/* another hack for IE5.5 */
* html #pmenu ul ul {
top:19px;
t\op:20px;
}
/* position the third level flyout menu */
#pmenu ul ul ul{
left:136px;
top:0;
width:150px;
}
/* position the third level flyout menu for a left flyout */
#pmenu ul ul ul.left {
left:-150px;
}
/* style the table so that it takes no ppart in the layout - required for IE to work */
#pmenu table {position:absolute; top:0; left:0;}
/* style the second level links */
#pmenu ul ul a, #pmenu ul ul a:visited {
background: url(../img/nav_d_bg.jpg) repeat-x;
color:#ffffff;
height:20px;
line-height:1.7em;
width:129px;
border-top: 1px solid #ffffff;
}
/* yet another hack for IE5.5 */
* html #pmenu ul ul a{
width:150px;
w\idth:129px;
}
/* style the top level hover */
#pmenu a:hover, #pmenu ul ul a:hover{
color:#fff;
background: #669B08;
}
#pmenu :hover > a, #pmenu ul ul :hover > a {
color:#fff;
background: url(../img/nav_a_bg.jpg) repeat-x;
}
/* make the second level visible when hover on first level list OR link */
#pmenu ul li:hover ul,
#pmenu ul a:hover ul{
visibility:visible;
}
/* keep the third level hidden when you hover on first level list OR link */
#pmenu ul :hover ul ul{
visibility:hidden;
}
/* make the third level visible when you hover over second level list OR link */
#pmenu ul :hover ul :hover ul{
visibility:visible;
}
Ich bin für jeden Tipp dankbar 🙂