locked
Problems setting menu height RRS feed

  • Question

  • User-1768017055 posted

    I am trying to use the Menu in one application and I had some troubles defining the height of the menu items.
    Of course i can use padding and the font size to get the height I need...
     
    But if you just try to define the height at the SimpleMenu.css, it will be ignored because the rules on IEMenu6.css forced the height
     
    ul.AspNet-Menu li {
    float: left !important;
    height: 1% !important;
    }
    ul.AspNet-Menu
    li a, ul.AspNet-Menu li span {
    height: 1% !important;
    }
    So if you just want to define the height at SimpleMenu.css you can't!
     
    The other problem is that if you use the Embedded version, the IEMenu6.css resource will always be included in the page, no matter what browser it's used.
     
    And there is other issue, in the line 64 of the Menuadapter.cs, one thing is wrong, should be Menu and not TreeView.
    filePath = folderPath.EndsWith("/") ? folderPath + "MenuAdapter.js" : folderPath + "/TreeViewAdapter.js";

    I am thinking in costumize the adapter for my application and not use the embedded recources. And also use browser detection to include or not the css for ie6.
     
    But I would apreciate your feed back over the issues mentioned above.

    Monday, May 5, 2008 7:39 PM

Answers

  • User-1768017055 posted
    Right now I am using the latest version of the adapters and the IE6Menu.css is not a issue at this time because I am using ie7 and firefox. This happens because the latest version already check the browser before include browser specific css. I will try how it goes with IE6 and if necessary I would probably remove all the embedded styles (Menu.css and IEMenu6.css) from the menu adapter and add the necessary rules to my css files.
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, May 6, 2008 11:16 AM

All replies

  • User-1768017055 posted

    I realise that the issues with IEMenu6.css and the treeview being referenced from the MenuAdapter are already solved in the latest version of the source code section at http://www.codeplex.com/cssfriendly

    So only the main question of my post remains about the problem setting the menu height.

    Thanks in advance.

    Monday, May 5, 2008 8:33 PM
  • User-656867934 posted

    I would comment out the inclusion of IE6Menu.css, then recompile the DLL. If you don't want to do that, you can try using a more specific CSS rule, that may override the default (i.e. div.mySelectorClass ul.AspNet-Menu li { height: 25px; }), or call your CSS after the links to WebResource.axd.

    Tuesday, May 6, 2008 2:14 AM
  • User-1768017055 posted
    Right now I am using the latest version of the adapters and the IE6Menu.css is not a issue at this time because I am using ie7 and firefox. This happens because the latest version already check the browser before include browser specific css. I will try how it goes with IE6 and if necessary I would probably remove all the embedded styles (Menu.css and IEMenu6.css) from the menu adapter and add the necessary rules to my css files.
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, May 6, 2008 11:16 AM
  • User-1768017055 posted

    I will close this thread because I am not having any problems with ie7 or firefox, if after the testings with ie6 I have any problem, I start another thread, specific with that problem.

    Thanks to bdemarzo and MikeJ83 for their help.

    Tuesday, May 6, 2008 3:51 PM