Professional Documents
Culture Documents
CSS Lec-39 ScrollMenu and Sidebar Menu.0bee388
CSS Lec-39 ScrollMenu and Sidebar Menu.0bee388
CSS Lecture-39
Topic: Scroll Menu and Sidebar Menu
ScrollMenu
Sometimes you want to present many options to the visitors but the space on
webpage is limited in such situation one can make use of scrollable menu.
<style>
div.scrollmenu {
background-color: #333;
overflow:auto; /* overflow:scroll for both Hori and Vertical*/
white-space: nowrap;
}
div.scrollmenu a {
display: inline-block;
color: white;
text-align: center;
padding: 14px;
text-decoration: none;
}
div.scrollmenu a:hover {
background-color: #777;
}
</style>
</head>
<body>
<div class="scrollmenu">
<a href="#">Home</a>
<a href="#">News</a>
<a href="#">Contact</a>
<a href="#">About</a>
<a href="#">Support</a>
Course: Java Script, Info Planet Programming Classes Prepared By: Atul Kabra, 9422279260
Course: Client Side Scripting, Prepared By: Atul Kabra, 9422279260
<a href="#">Blog</a>
<a href="#">Tools</a>
<a href="#">Base</a>
<a href="#">Custom</a>
<a href="#">More</a>
<a href="#">Logo</a>
<a href="#">Friends</a>
<a href="#">Partners</a>
<a href="#">People</a>
<a href="#">Work</a>
</div>
</body>
</html>
Output:
Course: Java Script, Info Planet Programming Classes Prepared By: Atul Kabra, 9422279260
Course: Client Side Scripting, Prepared By: Atul Kabra, 9422279260
.sidebar a{
text-decoration: none;
font-size: 30px;
color:darkblue;
display:block;
height: 50px;
text-align: center;
margin-top:10px;
}
.sidebar a:hover{
color:red;
}
</style>
</head>
<body>
<div class="sidebar">
<a href="#">Home</a>
<a href="#">Products</a>
<a href="#">Company</a>
<a href="#">About</a>
</div>
</body>
</html>
Course: Java Script, Info Planet Programming Classes Prepared By: Atul Kabra, 9422279260
Course: Client Side Scripting, Prepared By: Atul Kabra, 9422279260
Output:
Course: Java Script, Info Planet Programming Classes Prepared By: Atul Kabra, 9422279260