locked
Yet another CSS Adapted Menu not showing in IE 6... anyone? RRS feed

  • Question

  • User-2109111975 posted

    Seems like a lot of people have experienced this, but I can't seem to find *the* answer anywhere... can anyone help me out?

    Menu displays (and works) perfectly in IE 7, Firefox, and Safari, but does not display at all in IE 6...

      here is the menu control:

            <div id="divSiteMenu">
                <asp:Menu ID="Menu1" runat="server" CssSelectorClass="MainMenu"
                    Orientation="Horizontal" StaticEnableDefaultPopOutImage="false" Width="100%">
                    <DataBindings>
                        <asp:MenuItemBinding DataMember="MenuItem" NavigateUrlField="NavigateUrl"
                        TextField="Text" ToolTipField="ToolTip" />
                    </DataBindings>
                </asp:Menu>
            </div>

    the HTML is rendered (in IE 6) as this:

     <div class="MainMenu" id="ct100_Menu1">
         <div class="AspNet-Menu-Horizontal">
              <ul class="AspNet-Menu" id="ulMenu">
                 <li class="AspNet-Menu-Leaf" id="liMenu">
                    <a href=".....">...</a>
                 </li>
                 <li......>
                 </li>
                 <li>....
                 </li>
              </ul>
           </div>
        </div>

    a sample of my css file:
    div.MainMenu
    {
        ;
        top:100px;
        z-index:99;
        width:100%;
    }

    .MainMenu ul.AspNet-Menu ul  /* Tier 2 */
    {
        width: 100%;
        top: 100%;
        left: 0;
    }

     

    If I change the widths to be absolute values (e.g. width:200px), the menu items show up... the whole reason I'm using the css adapter, however, is so that I can have an evenly spaced menu that spans the full width of the page.

    My first thought was to, somehow, make the .css file show width:200px (or something) if the browser was < IE7, else leave it as a percentage, but I can't seem to make that work... have tried adding visilibility:visible and display:block to the css file... also have tried removing the IEMenu6.css file to no avail...

     

    I also have a script that runs on my main page that resizes the menu and it's children to fit the page depending on how many children are in the menu:

                    double intNewWidth = (99.9 / (double)drs.Length);
                    string strChangeMenuWidth = "<script type='text/javascript'>";
                    strChangeMenuWidth += "var ulMenus = document.getElementById('ulMenu');";
                    strChangeMenuWidth += "var liMenus = document.getElementsByTagName('li');";
                    strChangeMenuWidth += "for (i=0;i<liMenus.length;i++)";
                    strChangeMenuWidth += "{";
                    strChangeMenuWidth += "if (liMenus[i].id == 'liMenu')";
                    strChangeMenuWidth += "{";
                    strChangeMenuWidth += "liMenus[i].style.width='" + intNewWidth.ToString() + "%';";
                    strChangeMenuWidth += "}";
                    strChangeMenuWidth += "}";
                    strChangeMenuWidth += "</script>";

                    Page.ClientScript.RegisterStartupScript(typeof(Page), "ChangeMenuWidth", strChangeMenuWidth);

    When this script runs, the menu options are displayed, but ALL of the options are displayed instead of just the parents... dunno if that's helpful or not, but there you go. :)

    (Again, everything works perfectly in Safari, IE7, and FF)

    Thank you!



     

    Thursday, May 29, 2008 5:58 PM

All replies

  • User1549770290 posted

    What version or build of the CSSFriendly Control Adapters are you using?

    Friday, May 30, 2008 12:19 PM
  • User-2109111975 posted

    hm... well... where can I look to find that out? (sorry!)

    Friday, May 30, 2008 2:37 PM
  • User1549770290 posted

    Download the latest change set here: http://www.codeplex.com/cssfriendly/SourceControl/ListDownloadableCommits.aspx

    There have been lots of bug fixes. 

     

    Friday, May 30, 2008 3:05 PM
  • User-2109111975 posted

    ok, I downloaded those files and uploaded everything to the site, but I get the same results... works on IE7 and FF, but displays nothing in IE 6 even tho the code is being rendered in the HTML...any other thoughts?  Thanks a lot!

    -jim

    Friday, May 30, 2008 3:29 PM
  • User1549770290 posted

    With the code plex version the java script is embedded in the dll so you don't need to add any scripts to your project from the css project or script tags, did you clean that all up?

    The CSS is also embedded so you don't need to include that link eithier.

    How many levels deep is your menu?

    Can you post your source from FireFox so I or someone else can help you further thanks.

    Friday, May 30, 2008 4:13 PM
  • User-552256801 posted

    That codeplex link gives a 500 server error.

    ......and you want me to use their code ???????????????????????????

    Wednesday, June 18, 2008 9:59 AM
  • User-2109111975 posted

    Hey all... I'm sorry for the lack of reply... Of all the weird things to happen, the company got sold, and my IE 6 menu problem became... not so much of a problem.

     

    When I load the main page in Firefox, the code generated for creating the menu is:

    <div class="MainMenu" id="ctl00_Menu1">
    <div class="AspNet-Menu-Horizontal">
    <ul class="AspNet-Menu" id="ulMenu">
    				<li class="AspNet-Menu-Leaf" id="liMenu">
    <a href="Support/Default.aspx" class="AspNet-Menu-Link" title="Get Help Finding the Answers YOU Need">
    Support</a>
    </li>
    <li class="AspNet-Menu-Leaf" id="liMenu">
    <a href="http://www.worksoftwaresystems.com" class="AspNet-Menu-Link" title="Main Page">
    Home</a>
    </li>
    				<li class="AspNet-Menu-Leaf" id="liMenu">
    <a href="/Training/Default.aspx" class="AspNet-Menu-Link" title="Get Training">
    Training</a>
    </li>
    </ul>

    </div>
    </div>
     
    The menu doesn't ever go more than 2 levels deep... and the super strange thing is that, when I load it in IE 6, the above code still shows when I View Source
     
    Thanks for all of the help and suggestions so far 

     

    Wednesday, June 18, 2008 10:06 AM
  • User1549770290 posted

    That codeplex link gives a 500 server error.

    ......and you want me to use their code ???????????????????????????

     I am not responsible for the codeplex site and I don't work for MS, but yes when the site is back up use that version instead of being a smart a**. I am just another developer trying to help you get the right stuff you need to do the job you wanted to do.

    Wednesday, June 18, 2008 10:10 AM
  • User-552256801 posted

    Sorry, that was not meant to offense you in any way, more like a joke. Of course, I don't blame you for their server problems. I should have added:[:)][:D][;)][:P][^o)]

    Don't you find it a bit funny, that a site offering code to make better websites, throws an 'Internal server error' ? I think it's funny.

    BTW: Just checked, the server is up again and link is working.

    Wednesday, June 18, 2008 11:11 AM
  • User-2109111975 posted

    I've removed all of the Javascript, CSS, App_Code, and App_Browsers files associated with the non-CodePlex adapter... added the CodePlex dll and .browser file to the project... in FF and IE7, the menu is still properly rendered as <ul> tags, but in IE6, the menu is rendered as tables.  So now it will display in 6, but I lose all of my CSS formatting - is that the expected result?  Thanks again everyone... still searching... will post the answer if I find it. :) 

    Wednesday, June 18, 2008 2:59 PM
  • User1549770290 posted

    I've removed all of the Javascript, CSS, App_Code, and App_Browsers files associated with the non-CodePlex adapter... added the CodePlex dll and .browser file to the project... in FF and IE7, the menu is still properly rendered as <ul> tags, but in IE6, the menu is rendered as tables.  So now it will display in 6, but I lose all of my CSS formatting - is that the expected result?  Thanks again everyone... still searching... will post the answer if I find it. :) 

    Nope, are you using the latest build/changeset?

    I am using it in IE 6 and it is rendering ul tags.

    Wednesday, July 2, 2008 11:58 AM
  • User-2109111975 posted

     yah, I am... I redownload from codeplex and tried the compiled dll version of the adapters... also tried the non-compiled version, but no dice in IE6...

     However, I just quit that job, so I no longer care. :)  It must have been something else in the page that was preventing it from showing as I've been able to use the adapter on a page for my new job, and IE6 seems to work ok.

     
    So... I'm going to chalk this up to external forces and call it closed.

    If anyone wants more info on what I was doing, I'm more than happy to provide more code.

    I really really appreciate all of the suggestions... Thank you!
     

    Wednesday, July 2, 2008 1:34 PM
  • User1549770290 posted

     yah, I am... I redownload from codeplex and tried the compiled dll version of the adapters... also tried the non-compiled version, but no dice in IE6...

     However, I just quit that job, so I no longer care. :)  It must have been something else in the page that was preventing it from showing as I've been able to use the adapter on a page for my new job, and IE6 seems to work ok.


    So... I'm going to chalk this up to external forces and call it closed.

    If anyone wants more info on what I was doing, I'm more than happy to provide more code.

    I really really appreciate all of the suggestions... Thank you!
     

    If your using the compiled dll then you are probaly not using the latest version of the lib, use the latest change set as there are lots of bug fixes included in the latest change set. I posted a link earlier to the latest change set a few posts back.

    Wednesday, July 2, 2008 2:55 PM