Himas Rafeek
Posted on: 2 years ago
CSS

Drop down menu with fade in no scripting

The first thing you might notice is that I am not using nested lists to layout the menu. That is an old XHTML layout technique. I am using the more semantically correct HTML5 tag. Menus are not lists, they are navigation so using the more modern tag makes sense, and it turns out to be easier to work with.


                                          Markup:     CSS:.menusection, .menusection2 {
    position: relative;
    width: 15vw;
    float: left;
    border: 1px solid black;
    z-index: 10;
    height: 1em;
    background-color: magenta;
    padding: 3vh;
    border-radius: 10px;
}
.menusection:hover  {
    background-color: orange;
    transition-property: background-color;
    transition-duration: 2s;
    transition-timing-function: ease-out;
}