CSS fly out menus.

Associate
Joined
19 Jul 2006
Posts
1,847
Looks ok in Firefox but not IE :( CSS fly out menus.

Im trying to make a fly out menu and seen some code over at http://www.cssplay.co.uk/menus/muti-line-flyout.html
but in all honesty im not to sure whats going on there.

My try :
Code:
   <div id="sidecol">
                <ul id="mainnav">
                    <li><a href="#">Home</a></li>
                    <li><a class="fly" href="#">link1</a></li>
                    <ul class="level2">
                        <li><a href="#">flyoutlink</a></li>
                        <li><a href="#">flyoutlink</a></li>
                        <li><a href="#">flyoutlink</a></li>
                     </ul>
                    <li><a href="#">link </a></li>
                    <li><a href="#">link</a></li>
                    <li><a href="#">link</a></li>
                    <li><a href="#">link</a></li>
                </ul>
            </div><!-- end of side coloum -->
Code:
#mainnav ul, #mainnav li {
    padding-top:15px;
    font-family:"American Typewriter", Arial, Calibri, sans-serif;
    list-style:none;
    text-align:center;
    font-size:20px;
    text-align:center;
}

ul li:hover {
    position:relative;
}

ul ul {
    position:absolute;
    left:-9999px;
}
:hover ul ul {
    left:160px;
    top:0px;
    background-color:#FE0000;
}

#mainnav a, #mainnav a:visited {
   text-decoration: none;
   color:#000;
}

#mainnav a:hover {
    color:#ffcc00;

I can either hide the flyout bit and not get it to display or have it out all the time. also using
#mainnav ul ul {
position:absolute;
left:-9999px;
}
Has no effect it has to be ul ul ?

TIA
 
Last edited:
Thank gord and MarcLister, I managed to get it working. Yeah im trying to learn, I dont mind using other peoples code if i know what is going on. To be honest this menu was done a lot by trial and error just changing the code to see what happened.

Some of the other problems were IE hacks that i had to put in. why cant people just use safari/opera :(
 
yeah that sites for a school and like you say as much as we hate it most people do use IE so it has to work in that first. well done on the identical rendering on 3 browsers :)
I've ended up with a few if statements in there and work rounds for min-height
 
Back
Top Bottom