Submit Your Article Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Code > HTML, XHTML and CSS

Reply
 
LinkBack Thread Tools
Old May 28th, 2008, 07:40 AM   #1
New Member
 

Join Date: May 2008
Location: UK
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 styler is on a distinguished road
nav hover issue

Hi

I've created a horizontal nav bar where i've positiond each list item slightly over the next to create an overlap effect. i have used z-index so when you hover each item it comes to the foreground, see working example here:

http://dave-tyler.co.uk/emperor/navtest.html

this works fine in Firefox, Safari etc but (as always) IE7 & 6 has a problem when you hover - it doesn't seem to recognize the z-index value so doesn't bring each item forward.

any ideas?

(the css is in the head so just view source).
styler is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old June 1st, 2008, 08:31 AM   #2
Aso
Most Reputable Member
 

Join Date: Oct 2007
Location: UK
Posts: 1,633
Blog Entries: 2
Thanks: 22
Thanked 84 Times in 79 Posts
Rep Altering Power: 0 Aso is on a distinguished road
Re: nav hover issue

You might want to try increasing the width and adding a negative margin on hover, rather than using z-index.
Code:
#id {
width: 100px
}
#id:hover {
width: 110px;
margin-right: -10px
}
Obviously these dimensions are just examples, so replace with your own

The negative margin simply means the item to the right of the element is not 'pushed' over (the negative margin is equal to the additional width when hovered).
Aso is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old June 1st, 2008, 12:29 PM   #3
New Member
 

Join Date: May 2008
Location: UK
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 styler is on a distinguished road
Re: nav hover issue

that works great - many thanks
styler is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old June 1st, 2008, 02:53 PM   #4
Aso
Most Reputable Member
 

Join Date: Oct 2007
Location: UK
Posts: 1,633
Blog Entries: 2
Thanks: 22
Thanked 84 Times in 79 Posts
Rep Altering Power: 0 Aso is on a distinguished road
Re: nav hover issue

Glad to help styler - if you have any more question feel free to ask
Aso is offline  
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

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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
CSS li hover. PicoDeath HTML, XHTML and CSS 9 December 19th, 2007 10:26 AM
css hover alexgeek HTML, XHTML and CSS 9 August 2nd, 2007 02:18 PM
a:hover and background-position issue with ie6 mezema HTML, XHTML and CSS 5 June 15th, 2006 11:32 AM


Search Engine Optimization by vBSEO 3.2.0 RC8