
When we create a navigation menu we use the unordered list <ul> element and <li> items and by default it is displayed as vertical menu. We then use the float property to transform it into a horizontal menu. That is the only difference between the vertical menu and the horizontal menu. If you remove the float property from the horizontal menu you get a vertical menu.Most of the css styles remain the same.
HTM-CSS SIMPLE MENU
| VERTICAL MENU TWO COLUMN LAYOUT |
| <div class=”column” id = “menu”> <ul> <li><a href = “home.html”>Home</a></li> <li><a href = “reservation.html”>Reservation management</a></li> <li><a href = “rating.html”>Rates management</a></li> <li><a href = “booking.html”>On-line Booking</a></li> <li><a href = “creation.html”>Re-creation</a></li> <li><a href = “services.html”>Services</a></li> <li><a href = “transport.html”>Transport</a></li> <li><a href = “home.html”>Invoicing</a></li> </ul> </div> |
When we run this code we get a vertical navigation menu. The menu items will be blue and underlined and with bullets. We can use the following css to style the menu.
| CSS STYLES FOR A NAVIGATION MEU |
| #menu ul {list-style-type: none; margin: 0;padding: 0;} #menu li {padding: 6px;margin-bottom: 2px; background-color: #222; color:#c6b7ff;border-radius:5px; border:1px solid #bbb;} #menu li a{text-decoration:none;color:#aaa;} #menu li:hover {background-color: #888;} |
There is no strange css here list-style type removes the bullets from the list and text-decoration none removes the underline. li:hover defines what happens to the background onmouseover. The rest speaks for itself.
So we want to include both the vertical and the horizontal menu so that you can compare and contrast the two types of menus. Just like you did with the khoi-khoi and the Bushmen in history at junior secondary.
Vertical menu are mostly used to create dashboards for the administration page of your web application. You can download this and all the layouts we have looked at here: Web layouts
STUDENT FORUM FOR WED DESIGN




