Results 1 to 5 of 5

Thread: How's this menu done?!

  1. #1
    Join Date
    Sep 2008
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile How's this menu done?!

    Does anyone know how this menu is done?
    http://www.huhmagazine.co.uk/

    I think it's java over just normal rollover image as there seems to be a quick fade.

    I really like the simplicity and classiness of it and wondering how to go about creating it.

    Many Thanks.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    That would be javascript, not java, which is completely different.

    But it looks like it's neither. Looks like it's pure css. Here's the markup:

    HTML Code:
    		<div id="nav">
    			<ul>
    			<li class='on'>			<a href="http://www.huhmagazine.co.uk">home</a></li>
    				<li class="off"><a href="http://www.huhmagazine.co.uk/art">art &amp; design</a></li>
    				<li class="off">
    				<a href="http://www.huhmagazine.co.uk/music">music</a></li>
    				<li class="off"><a href="http://www.huhmagazine.co.uk/film">film</a></li>
    				<li class="off"><a href="http://www.huhmagazine.co.uk/culture">culture</a></li>
    				<li class="off"><a href="http://www.huhmagazine.co.uk/video">video</a></li>
    				<li class="off"><a href="http://www.huhmagazine.co.uk/listings">what's on</a></li>
    				<li class="off"><a href="http://shop.huhmagazine.co.uk">shop</a></li>
    				<li class="off"><a href="feed://www.huhmagazine.co.uk/blog/rss/feed.php">RSS</a></li>
    				<li class="search_mag">
    				<img src="http://www.huhmagazine.co.uk/images/template/mag.jpg">
    				</li>
    				<li class="search">
    				<form action="http://www.huhmagazine.co.uk/search.php" method="get" name="search" class="search_box">
    				<input type="text" class="search_input" name="q" value="" onFocus="if(!this._haschanged){this.value=''};this._haschanged=true;">
    				</form>
    				</li>
    				<div class="clear"></div>
    			</ul>
    		</div>
    	<div class="clear"></div>
    Here's the css:

    Code:
    #nav	{
    width:984px;
    text-align: left;
    padding: 0;
    margin: 12px 0px 0px 0px;
    float: left;
    border-bottom: 1px solid #000;
    border-top: 1px solid #000;
    }
    
    #nav ul	{
    list-style: none;
    margin: 0;
    padding: 0;
    display: inline;
    float: left;
    width: 984px;
    }
    
    .off	{
    display: inline;
    }
    
    .off a	{
    font-family: Times New Roman, Times;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 5px 16px;
    margin: 2px 1px 2px 0px;
    color: #000;
    text-decoration: none;
    float:left;
     -webkit-transition: color 0.2s ease-in;
     -moz-transition: color 0.2s ease-in;
     -o-transition: color 0.2s ease-in;
     -webkit-transition: background 0.2s ease-in;
     -moz-transition: background 0.2s ease-in;
     -o-transition: background 0.2s ease-in;
    }
    
    .off a:hover	{
    background: #000;
    color: #FFF;
    text-decoration: none;
    }
    
    .on	{
    display: inline;
    }
    
    .on a	{
    font-family: Times New Roman, Times;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 5px 16px;
    background: #000;
    margin: 2px 1px 2px 0px;
    color: #FFF;
    float:left;
    text-decoration: none;
    }
    There's more css, for like other pages where there's another level to the menu.

    I can't find a credit, so it might be proprietary. If it is we're not allowed to lift it for you. I'd try contacting the webmaster or site owner to find out where they got it from or if it's in house.

    But the principles should be pretty clear from what I have shown you.

    There are tons of css menus available here at Dynamic Drive, see:

    http://www.dynamicdrive.com/style/cs...y/category/C1/

    And tons more around the web, Google:

    css menu
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Dec 2008
    Location
    Portsmouth, UK
    Posts
    1,891
    Thanks
    2
    Thanked 441 Times in 435 Posts

    Default

    if you are refering to the top menu (home etc) it is css and has no fade although that could be added using js

    having anoither look the css for a color transition of .2 of a second but has no effect on my IE or FF browsers
    Last edited by vwphillips; 07-22-2011 at 03:52 PM.
    Vic
    God Loves You and will never love you less.
    http://www.vicsjavascripts.org/Home.htm
    If my post has been useful please donate to http://www.operationsmile.org.uk/

  4. #4
    Join Date
    Sep 2008
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    so if I was to create rollover images in dreamweaver would it pretty much have the same effect as what's on their site?

    For some reason their CSS looks different, like there's a fade in there somewhere. Maybe it's just me going crazy!

    Thanks.

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I detected no fading, look again. But that could be done with javascript.

    To answer your question, yes. However, the page you linked to as an example uses no images. To get the same effect with images, the images would have to be preloaded and of a small byte size.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •