SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Member
    Join Date
    Jan 2007
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    IE7 issue with brothercake simplemenu

    iam using brothercakes simple menu, it works perfectly in firefox and IE6, however having problems in IE7. I have only been doing development work for less then 3 month so iam a beginner but the problem that iam having is:

    I have a horizontal nav, when user goes over a menu heading the dropdown appears, however the submenus are being displayed underneath the parent dropdown, however not the entire submenu is doing this i.e the first link on the submenu is overlapping the parent dropdown but the rest of the links are beneath.

    I tried having z-index in css for the submenu but his does not work.

    Can someone point me in the right direction why this is happening as every submenu should be displayed overlapping parent menu.

    Thanks in advance

  2. #2
    SitePoint Zealot
    Join Date
    Jul 2006
    Posts
    151
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try adding the following conditional comment into your main html page, adjusting the #nav for the id of the drop down menu in question.

    HTML Code:
        <!--[if IE]>
    	<style type="text/css">
    	#nav li:hover {
        position: static;
    	}
    	</style>
    	<![endif]-->
    Last edited by dwees; Jan 21, 2007 at 14:09. Reason: ooops #nav is site specific

  3. #3
    SitePoint Member
    Join Date
    Jan 2007
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks that worked like a charm, i've spent hours trying to figure out why it wasn't working.

  4. #4
    SitePoint Evangelist anjanesh's Avatar
    Join Date
    Jun 2004
    Location
    Mumbai
    Posts
    447
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    IE doesnt consider <!--[if IE]>.........<![endif]--> as a comment ?
    Anjanesh

  5. #5
    SitePoint Zealot
    Join Date
    Jul 2006
    Posts
    151
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's a conditional comment that ONLY IE picks up on. It's a way of including information just for IE.

    Dave

  6. #6
    SitePoint Wizard
    Join Date
    Mar 2001
    Posts
    3,537
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    IE doesnt consider <!--[if IE]>.........<![endif]--> as a comment ?
    IE is programmed to look inside comments for a string that starts with:

    [if expression]>

    and ends with:

    <![endif]

    See here:

    http://msdn.microsoft.com/workshop/a...omment_ovw.asp

    It's a conditional comment that ONLY IE picks up on. It's a way of including information just for IE.
    ...which by way of explanation does nothing to enlighten anyone wanting to understand why that works. IE6 and IE7 are both IE, so that style will apply to both.

  7. #7
    SitePoint Member
    Join Date
    Jan 2007
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I justed needed the conditional comments for IE7 as my dropdown menu's were already working correctly with IE6. I used dwees coding but used IF IE7 rather then IF IE.


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
  •