Jump to:

3392 Posts in 976 Topics by 852 members

Template Questions

SilverStripe Forums » Template Questions » dropdown menu for IE

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 762 Views
  • ph.kolb
    Avatar
    Community Member
    1 Post

    dropdown menu for IE Link to this post

    hello,

    I'm working on a dropdown menu, somehow i managed to make it work on Firefox, Safari and IE (Version XY on Windows 2000).

    On all the other IE Versions it doesn't show the submenu <ul id="Menu2"> at all.

    Seemingly it's a CSS problem. But after hours and hours on different blogs I still didn't figure it out.

    I hope you can understand my question and I hope I posted in the right forum,
    regards from switzerland.

    The code (Menu2 is dynamic, Menu1 isn't):

    div id="Menu1"><ul id="Menu1">
    <li class="Hom"><a href="">Home</a></li><li class="Team"><a href="">Team</a></li>
    <li class="Forschung"><a href="">Forschung</a></li><li class="Lehre"><a href="">Lehre</a></li>
    <li class="Info"><a href="">Infos</a></li><li class="Kontakt"><a href="">Kontakt</a></li></ul>   

    <% if Menu(2) %>
    <ul id="Menu2">
    <% control Menu(2) %>
    <li class="$LinkingMode"><a href="$Link">$MenuTitle</a></li>
    <% end_control %>
    </ul>
    <% end_if %></div>

    CSS:

    #Menu1 {
             float:left;
             width:160px;
             padding-right:50px;
             padding-left:10px;
             overflow:hidden;
             z-index:-1;
          
          }
                
             #Menu1 li {
                float:left;
                width:160px;
                height:21px;
                margin-bottom:5px;
                
             }
    #Menu1 li a {
                   display:block;
                   color:#fff;
                   font-size:1.3em;
                   text-decoration:none;
                   font-weight:normal;
                   padding:3px 5px;
                   
                }
    #Menu2 {
       margin-top: -2px;
       padding-bottom:2px;
       float:left;
       overflow:hidden;
       background-color:#fff;
       z-index:5;
    }
       #Menu2 li {
       background-color:#fff;
       }
       #Menu2 a {
          font-weight:normal;
          font-size:1.3em;
          line-height:1.6em;
          text-decoration:none;
       }

  • baba-papa
    Avatar
    Community Member
    279 Posts

    Re: dropdown menu for IE Link to this post

    Browser bugs are a shitty subject. Use a HTML/CSS framework to get rid of those problems.

    762 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.