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.


 Subscribe in a reader

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

Notices




Reply
 
LinkBack Thread Tools
  #1  
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Apr 9th, 2008, 14:04
Elite Veteran
Join Date: Aug 2005
Location: That Place
Posts: 2,044
Blog Entries: 1
Thanks: 0
Thanked 37 Times in 37 Posts
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.
__________________

Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Apr 9th, 2008, 18:10
Elite Veteran
Join Date: Aug 2005
Location: That Place
Posts: 2,044
Blog Entries: 1
Thanks: 0
Thanked 37 Times in 37 Posts
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.
__________________

Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Apr 9th, 2008, 19:57
Reputable Member
Join Date: Apr 2008
Location: Or-Yehuda, Israel
Age: 60
Posts: 129
Thanks: 0
Thanked 4 Times in 4 Posts
Re: CSS Drop-down navigation

I had something similar a few month back.

Try defining height in your hovers.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
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!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
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 03:21.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization 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