CSS Drop-down navigation

This is a discussion on "CSS Drop-down navigation" within the Web Page Design section. This forum, and the thread "CSS Drop-down navigation are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Apr 8th, 2008, 22:07
New Member
Join Date: Apr 2008
Location: Wales
Age: 33
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
CSS Drop-down navigation

Hi

I'm hoping somebody can help me with this please.

I've built a new CSS based ul li /li /ul based nested navigation for my site which you can see here on a demo page:

http://www.aditnow.co.uk/error.htm

The idea is basic, if you move over a menu item that has a sub-menu (e.g. 'Browse Forum' under 'Mine Exploration Forum' a side menu (nested ul li list) pops out. If that has a sub-menu (e.g. 'UK Mine Exploration Forums') then another side menu (nested ul lu list) pops out again.

It works very well in Internet Explorer 7, Firefox and Safari, but in Internet Explorer 6, when you move over a menu item that has sub-menus the item below the menu item (i.e. the parent) bumps down about 12px. It's to do with the display: block switch on the over/hover class which I know because if I set the nested blocks to display: block by default then the same padding appears in Internet Explorer 6.

Probably easier to see it in practice than follow that description though

This is my first post here so I don't know if I'm supposed to post the CSS, but in case not it can be seen at:

http://www.aditnow.co.uk/css/1/styles2.css

With the relevant bit for the navigation starting fairly near the top after the /* navigation */ comment.

Any help very gratefully received.

Thanks,
Simon
Reply With Quote

  #2 (permalink)  
Old Apr 9th, 2008, 14:04
moojoo's Avatar
Moderator
Join Date: Aug 2005
Location: Texas
Age: 31
Posts: 1,742
Blog Entries: 1
Thanks: 0
Thanked 17 Times in 17 Posts
Send a message via AIM to moojoo Send a message via MSN to moojoo Send a message via Yahoo to moojoo
Re: CSS Drop-down navigation

Use an IE conditional and an IE 6 specific style sheet to correct it. I would guess. I will look again when I have a bit more time.
__________________
The internet is just a fad.
http://www.mevans76.com
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
Reply With Quote
  #3 (permalink)  
Old Apr 9th, 2008, 17:06
New Member
Join Date: Apr 2008
Location: Wales
Age: 33
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Re: CSS Drop-down navigation

Thanks moojoo, appreciate it. I can't lock down what is causing the problem in IE 6 though, causing the white space to appear under the parent menu item, so at this stage wouldn't know what to tweak in a conditional stylesheet.

Thanks,
Simon
Reply With Quote
  #4 (permalink)  
Old Apr 9th, 2008, 18:10
moojoo's Avatar
Moderator
Join Date: Aug 2005
Location: Texas
Age: 31
Posts: 1,742
Blog Entries: 1
Thanks: 0
Thanked 17 Times in 17 Posts
Send a message via AIM to moojoo Send a message via MSN to moojoo Send a message via Yahoo to moojoo
Re: CSS Drop-down navigation

Ok tested it in IE 6. I see what is happening..

try adding width:100%; to the LI's and see if that doesn't fix it. IE 6 has a old bug with adding space between LI's.
__________________
The internet is just a fad.
http://www.mevans76.com
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
Reply With Quote
  #5 (permalink)  
Old Apr 9th, 2008, 19:57
Up'n'Coming Member
Join Date: Apr 2008
Location: Or-Yehuda, Israel
Age: 60
Posts: 92
Thanks: 0
Thanked 0 Times in 0 Posts
Re: CSS Drop-down navigation

I had something similar a few month back.

Try defining height in your hovers.
Reply With Quote
  #6 (permalink)  
Old Apr 9th, 2008, 22:15
New Member
Join Date: Apr 2008
Location: Wales
Age: 33
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Re: CSS Drop-down navigation

Quote:
Originally Posted by moojoo View Post
Ok tested it in IE 6. I see what is happening..

try adding width:100%; to the LI's and see if that doesn't fix it. IE 6 has a old bug with adding space between LI's.
Excellent thanks, that's nearly fixed it, it's now padding everything down a bit in both IE 6 and IE 7. But at least that suggests I'm getting closer to a fix. Thanks.
Reply With Quote
  #7 (permalink)  
Old Apr 9th, 2008, 23:20
New Member
Join Date: Apr 2008
Location: Wales
Age: 33
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Re: CSS Drop-down navigation

With width: 100% on the li tags I've just noticed as well as the padding appearing in IE 7 as well as IE 6 you can't scroll all the way down to a sub-menu in IE6/7 without the sub-menu vanishing. Annoying, but it looks as though something is flawed with this menu and I either live with it not working in IE 6 or rebuild it entirely

Thanks everybody for the input.
Reply With Quote
  #8 (permalink)  
Old Apr 10th, 2008, 10:51
New Member
Join Date: Apr 2008
Location: Wales
Age: 33
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Re: CSS Drop-down navigation

I've rebuilt it, and got it working correctly in Mozilla, Firefox, IE7 and Safari. But at the expense of removing the 1px white border-bottom from the li elements and of it working in IE6.

In IE6 the padding is back when you mouseover an li element that has 2nd or 3rd level sub-menu. If I put the 1px white border-bottom back in this padding disappears; but at the trade-off that the sub-menus vanish part way down in IE 7. I seem to be going round in circles, and have never had so many problems with a menu like this!
Reply With Quote
Reply

Thread Tools

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Navigation inkz Web Page Design 2 Apr 22nd, 2008 15:33
CSS Navigation Help! crackafaza Web Page Design 3 Jan 21st, 2008 15:56
Drop down menus drop behind flash header theGAME71135 Flash & Multimedia Forum 3 Jan 10th, 2008 09:42
CSS Drop Down Navigation is under lapping in Firefox cpando1974 Web Page Design 9 Apr 26th, 2007 10:56
CSS navigation AdRock Web Page Design 1 Jul 15th, 2006 10:56


All times are GMT. The time now is 08:20.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43