Hey,
Does nayone know how to make a drop down menu in CSS?
Thanks.
Hey,
Does nayone know how to make a drop down menu in CSS?
Thanks.
You can't make something with CSS. CSS is just a coding language to modify and arrange text and images. I'm afraid you're looking for something more like Javascript... unless you want to use an HTML form.![]()
Javascript is your best bet however recommend steering away from using javascript for navigation unless you have hidden navigation or footer navigation so robots can access other pages of your website.
You can definitely do a dropdown menu in css, it's actually recommended. Using the pseudo class :hover you can make all sorts of awesome things happen. Here is one in only css and the basic ul and li tags.
Easy CSS Dropdown Menus
The code below is a sample code for dropdown menu.
Let's start with the XHTML first and foremost.
Next, we’ll start adding a few styles on navigation bar.<ul id="navbar">
<li><a href="#">Item One</a><ul>
<li><a href="#">Subitem One</a></li>
<li><a href="#">Second Subitem</a></li>
<li><a href="#">Numero Tres</a></li></ul>
</li>
<!-- ... and so on ... -->
</ul>
Hope that code will help you.#navbar {
margin: 0;
padding: 0;
height: 1em; }
#navbar li {
list-style: none;
float: left; }
#navbar li a {
display: block;
padding: 3px 8px;
background-color: #5e8ce9;
color: #fff;
text-decoration: none; }
Self Leadership International can design deliver or customise a communication skills program and motivational speaker for your organisation that will result in culturally sensitive, verbal and non-verbal behaviours. Good communication is good for business.
hey thanks for sharing
Bookmarks