Quality stock photos for your creative or marketing needs. Photolibrary - We Get It


Graphic Design Forums: UK forums for graphic designers » Website Design Forums: » Website Coding & Programming Forum: » CSS Drop down menus

Reply
Old 03-12-2009, 08:56 PM   #1
Member
 
Join Date: Dec 2008
Posts: 59
Thanks: 10
Thanked 3 Times in 3 Posts
Default CSS Drop down menus

How do I make a drop down menu using CSS like on

SmartWaveTech :: Re-inventing the future

All replies are appreciated.

Chris
GingerChris is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookStumble this Post!Twit this!
Reply With Quote
Old 03-13-2009, 11:26 PM   #2
Member
 
Join Date: Feb 2009
Location: Cambridge
Posts: 64
Thanks: 1
Thanked 13 Times in 12 Posts
Send a message via Skype™ to salvador
Default

I'd ask Mr Google if I were you ;)

~Peace~
salvador is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookStumble this Post!Twit this!
Reply With Quote
Old 03-14-2009, 09:57 PM   #3
Junior Member
 
conanite's Avatar
 
Join Date: Feb 2009
Posts: 20
Thanks: 2
Thanked 2 Times in 2 Posts
Default

using CSS, make the menu invisible, then use more CSS to make it visible again when hovered

HTML Code:
<div class='menu'>menu label
  <ul>
    <li>menu item 1</li>
    <li>menu item 2 etc</li>
  </ul>
</div>
Code:
.menu ul { display:none; }

.menu:hover ul { display:block; }
That's the basic principle, there's heaps more to do to get positioning right. And if you're targeting IE, .menu:hover won't work, you'll need some javascript onmouseover/onmouseout handlers to simulate this.
conanite is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookStumble this Post!Twit this!
Reply With Quote
Old 03-15-2009, 04:45 PM   #4
Member
 
Join Date: Dec 2008
Posts: 59
Thanks: 10
Thanked 3 Times in 3 Posts
Default

I cant get it to work...

This is my code:

Code:
 <ul id="tablist">
        <li><a class="current" href="index.html" accesskey="m"><span class="key">Home</span></a>        </li>
        <li><a href="about.html" accesskey="e"><span class="key">A</span>bout Us</a></li>
        <li><a href="dedicated.html" accesskey="p"><span class="key">D</span>edicated Servers</a></li>
        <li><a href="vps.html" accesskey="c"><span class="key">V</span>irtual Servers</a></li>
        <li><a href="support.html" accesskey="r"><span class="key">S</span>upport</a></li>
      </ul>
    </div>
and this is my CSS

Code:
#tablist{  margin: 25px 0 0 0;  }
	#tablist li{ list-style: none; display: inline;  }
	#tablist li a{
		text-decoration: none;
		margin: 0 3px 0 0;
		padding: 4px 15px;
		border: 1px solid #3B3B3B;
		font-weight: bold;
		color: #ccc;
	}
	#tablist li a:hover{
		border: 1px solid #55684A;
		color: #fff;
	}
	#tablist li a.current{
		background: #ADD597;
		color: #fff;
	}
	#tablist .key { text-decoration: underline; }
GingerChris is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookStumble this Post!Twit this!
Reply With Quote
Old 03-15-2009, 04:47 PM   #5
Member
 
Join Date: Dec 2008
Posts: 59
Thanks: 10
Thanked 3 Times in 3 Posts
Default

I want to be able to get dedicated, vps and support to drop down with about 4 links in each

edit sorry for double post.
GingerChris is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookStumble this Post!Twit this!
Reply With Quote
Old 03-16-2009, 02:07 AM   #6
Junior Member
 
conanite's Avatar
 
Join Date: Feb 2009
Posts: 20
Thanks: 2
Thanked 2 Times in 2 Posts
Default

The submenu needs to be inside the <li> menu header. The submenu display is controlled by the CSS rule "#tablist li:hover ul" (or javascript for IE).

HTML Code:
 <ul id="tablist">
        <li>
           <a class="current" href="index.html" accesskey="m"><span class="key">Home</span></a>
           <ul>
             <li><a href="item1.html">item 1</a></li>
             <li><a href="item2.html">item 2</a></li>
           </ul>
        </li>
        <li>etc</li>
      </ul>
Code:
#tablist li ul { display:none; }

#tablist li:hover ul { display:block; }
Afaik that should do the trick. Sorry if my previous reply was unclear...
conanite is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookStumble this Post!Twit this!
Reply With Quote
Old 06-11-2009, 10:16 AM   #7
Member
 
Royale-Graphics's Avatar
 
Join Date: May 2009
Location: Nottingham
Posts: 34
Thanks: 2
Thanked 1 Time in 1 Post
Default

I used this website for my menu Stu Nicholls | CSSplay | CSS only menus
Royale-Graphics is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookStumble this Post!Twit this!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Flyer Printing | Print Reseller Scheme | Graphic Design | Logo Designer | Web Design UK | Graphic Design UK | Letterhead Printing
Business Card Printing | UK Business Forum | Logo Designer | NCR Pads | NCR Books | Receipt Books | Drinks Coasters | A6 Flyers | A5 Leaflets
Web Design & Development | vBulletin Skins | Small Business Websites | Leaflets | Leaflet Printing | Web Design Liverpool | Invoice Books


DISCLAIMER: All posts on this forum express the views and opinions of the author only, not the owners, staff or advertisers, hence we will not be held liable.


Powered by vBulletin®
© Copyright Jelsoft Enterprises Ltd
SEO by vBSEO 3.2.0 RC5 ©2008, Crawlability, Inc.