CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > microsoft_downloads.css_friendly_control_adapters Tags:
Item Type: NewsGroup Date Entered: 1/4/2007 6:14:01 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 11 Views: 18 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
12 Items, 1 Pages 1 |< << Go >> >|
sunscar9536
Asp.Net User
Multiple Menus - Overlay Problem1/4/2007 6:14:01 PM

0/0

I apologize if this has already been addressed (and solved).

I've read through most of the posts concerning overlay and z-index problems and still can not find a solution to this problem. I have two menus (side by side) and when the second tier is displayed, it goes under the second menu beside it. I'm including a screenshot that shows what's happening.

What I've tried so far: Changing the Z index on nearly every CSS property for the menu, Adding lower and higher z-index values to the DIV container for the menus and the <asp: menu> tag itself...

Any information or help will be appreciated

Menu Overlay Problem

sunscar9536
Asp.Net User
Re: Multiple Menus - Overlay Problem1/5/2007 3:45:42 PM

0/0

Hmmm.... I'm starting to wonder if there is a solution to this problem. I've continued to try different methods with no luck.

 Anyone have any idea?

Russ Helfand
Asp.Net User
Re: Multiple Menus - Overlay Problem1/5/2007 9:03:13 PM

0/0

Is there any way you could boil down your case to something that you could post here on this thread? I want to help and I'm pretty sure this is solvable by adjusting the z-indices but coaching you through that without being able to refer to specific tags and CSS rules is going to be hard. If you can't post the markup and CSS to a postable form then try to sketch out a basic DOM that represents the various container tags, menus, etc.

If you want, give this a quick try. Isolate your two main containers, the boxes on the left and right.  Put a z-index on both.  Make the one on the left higher than the right but make sure they BOTH have z-indices explicitly set. Be careful to impact <div> tags that are siblings.  This is absolutely critical.  When you find the <div> for the box on the left then find the <div> for the rightmost box but make certain (absolutely certain) that these are siblings in the DOM. Only then can you set the z-index on both such that they impact each other properly in IE.


Russ Helfand
Groovybits.com
sunscar9536
Asp.Net User
Re: Multiple Menus - Overlay Problem1/6/2007 6:02:42 AM

0/0

Russ,

Thanks for replying... I was about to loose all hope. I've created a quick test page using the same CSS for the menus (which is a modified version of the PrettyMenu that comes with the adapters...) The test page I created contains only <divs> and I've explicitly set a "z-index" value for each. This still doesn't seem to work..I also tried wrapping the 2 divs with 1 div, but got the same result. I'll post the code for each below. Is it by design the second tier is below the top tier? Even having only one menu, you have to bump the "left" value up so that it doesn't go under the top tier. I can post a SS of this if it would make that question a little more clear...

Code from new test page:

    <form id="form1" runat="server">
<div style="float:left; clear:right; z-index: 500">
<asp:menu id="Menu1" runat="server" DataSourceID="xmlMenu" cssselectorclass="PrettyMenu">
<DataBindings>
<asp:MenuItemBinding DataMember="siteMapNode"
NavigateUrlField="url" TextField="title" ToolTipField="description"
ValueField="title" />
</DataBindings>
</asp:menu><asp:XmlDataSource id="xmlMenu" runat="server" XPath="/*/*" DataFile="~/Links/Menu1.xml"></asp:XmlDataSource>
</div>
<div style="float:left; clear:right; z-index: 1; margin-left: 15px;">
<asp:menu id="Menu2" runat="server" DataSourceID="xmlMenu" cssselectorclass="PrettyMenu">
<DataBindings>
<asp:MenuItemBinding DataMember="siteMapNode"
NavigateUrlField="url" TextField="title" ToolTipField="description"
ValueField="title" />
</DataBindings>
</asp:menu><asp:XmlDataSource id="xmlMenu2" runat="server" XPath="/*/*" DataFile="~/Links/Menu1.xml"></asp:XmlDataSource>
</div>
</form>

 CSS for Menus (modified version of PrettyMenu - I've removed all comments so the post wouldn't be so long...): 

.foo {}
.PrettyMenu .AspNet-Menu-Vertical
{
position:relative;
top: 0em;
left: 0em;
z-index: 300;
}

.PrettyMenu ul { background:#7795BD;
}

/* Top tier */ ..PrettyMenu .AspNet-Menu-Vertical ul.AspNet-Menu { width: 15em;
}

.PrettyMenu ul.AspNet-Menu ul { width: 10.5em;
left: 9.2em;
top: 0em;
border: solid 1px black;
}

.PrettyMenu ul.AspNet-Menu ul ul { width: 11.5em;
left: 10.4em;
}


.PrettyMenu ul.AspNet-Menu li { background-color: White;
border: 0px;
}

.PrettyMenu ul.AspNet-Menu li a,
.PrettyMenu ul.AspNet-Menu li span { background-color: White;
border: 0px;
padding: 2px;
}

.PrettyMenu ul.AspNet-Menu li.AspNet-Menu-Leaf a,
.PrettyMenu ul.AspNet-Menu li.AspNet-Menu-Leaf span { background-image: none;
}

.PrettyMenu ul.AspNet-Menu li:hover,
.PrettyMenu ul.AspNet-Menu li.AspNet-Menu-Hover { background-color: white;
}

.PrettyMenu ul.AspNet-Menu li:hover a,
.PrettyMenu ul.AspNet-Menu li:hover span,
.PrettyMenu ul.AspNet-Menu li.AspNet-Menu-Hover a,
.PrettyMenu ul.AspNet-Menu li.AspNet-Menu-Hover span,
.PrettyMenu ul.AspNet-Menu li:hover li:hover a,
.PrettyMenu ul.AspNet-Menu li:hover li:hover span,
.PrettyMenu ul.AspNet-Menu li.AspNet-Menu-Hover li.AspNet-Menu-Hover a,
.PrettyMenu ul.AspNet-Menu li.AspNet-Menu-Hover li.AspNet-Menu-Hover span,
.PrettyMenu ul.AspNet-Menu li:hover li:hover ul a:hover,
.PrettyMenu ul.AspNet-Menu li:hover li:hover ul span.Asp-Menu-Hover,
.PrettyMenu ul.AspNet-Menu li.AspNet-Menu-Hover li.AspNet-Menu-Hover ul a:hover,
.PrettyMenu ul.AspNet-Menu li.AspNet-Menu-Hover li.AspNet-Menu-Hover ul span.Asp-Menu-Hover { background-color: #d8d8d8;
color: black;
}

.PrettyMenu ul.AspNet-Menu li:hover ul a,
.PrettyMenu ul.AspNet-Menu li:hover ul span,
.PrettyMenu ul.AspNet-Menu li.AspNet-Menu-Hover ul a,
.PrettyMenu ul.AspNet-Menu li.AspNet-Menu-Hover ul span,
.PrettyMenu ul.AspNet-Menu li:hover li:hover ul a,
.PrettyMenu ul.AspNet-Menu li:hover li:hover ul span,
.PrettyMenu ul.AspNet-Menu li.AspNet-Menu-Hover li.AspNet-Menu-Hover ul a,
.PrettyMenu ul.AspNet-Menu li.AspNet-Menu-Hover li.AspNet-Menu-Hover ul span { background-color: White;
color: black;
}

.PrettyMenu ul.AspNet-Menu li a:hover,
.PrettyMenu ul.AspNet-Menu li span.Asp-Menu-Hover { background-color: White;
color: black;
}

.PrettyMenu ul.AspNet-Menu li.AspNet-Menu-Leaf a:hover { background-image: none;
}
sunscar9536
Asp.Net User
Re: Multiple Menus - Overlay Problem1/8/2007 3:59:12 PM

0/0

A little new development....

After playing with the Z-Index values, I finally got it to work within FireFox, but still no luck in IE. Does anyone know a fix or workaround for this?

The environment in which this is going to be used will be IE only....

Thanks

sunscar9536
Asp.Net User
Re: Multiple Menus - Overlay Problem1/12/2007 1:08:33 AM

0/0

I have tried every single z-index value I know of on every thing that even accepts a z-index value and still can't figure this one out... From what I've read z-index values and IE are very tricky.

I tested the exact same layout using the traditional ASP.NET menus and it works fine in both IE and Firefox...

Does ANYONE know what I can do to get around this problem? I would really appreciate some help.

Thanks...
 

Russ Helfand
Asp.Net User
Re: Multiple Menus - Overlay Problem1/12/2007 2:26:12 AM

0/0

I did some experimentation and want to discuss what I found.  First, I had to rework the sample you posted above because I didn't have the XML files that that markup referred to.  No worries, I just whipped up some static menu items.  Here's what I ended up with:

<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>ASP.NET 2.0 CSS Friendly Control Adapters 1.0</title>
    <link runat="server" rel="stylesheet" href="~/CSS/Import.css" type="text/css" id="AdaptersInvariantImportCSS" />
<!--[if lt IE 7]>
    <link runat="server" rel="stylesheet" href="~/CSS/BrowserSpecific/IEMenu6.css" type="text/css" id="IEMenu6CSS" />
<![endif]-->

    <style type="text/css">
    <!--
.PrettyMenu .AspNet-Menu-Vertical
{
    top: 0em;
    left: 0em;
    z-index: 300;
}

.PrettyMenu ul
{
    background:#7795BD;
}

/* Top tier */
.PrettyMenu .AspNet-Menu-Vertical ul.AspNet-Menu
{
    width: 15em;
}

.PrettyMenu ul.AspNet-Menu ul
{
    width: 10.5em;
    left: 9.2em;
    top: 0em;
    border: solid 1px black;
}

.PrettyMenu ul.AspNet-Menu ul ul
{
    width: 11.5em;
    left: 10.4em;
}


.PrettyMenu ul.AspNet-Menu li
{
    background-color: White;
    border: 0px;
}

.PrettyMenu ul.AspNet-Menu li a,
.PrettyMenu ul.AspNet-Menu li span
{
    background-color: White;
    border: 0px;
    padding: 2px;
}

.PrettyMenu ul.AspNet-Menu li.AspNet-Menu-Leaf a,
.PrettyMenu ul.AspNet-Menu li.AspNet-Menu-Leaf span
{
    background-image: none;
}

.PrettyMenu ul.AspNet-Menu li:hover,
.PrettyMenu ul.AspNet-Menu li.AspNet-Menu-Hover
{
    background-color: white;
}

.PrettyMenu ul.AspNet-Menu li:hover a,
.PrettyMenu ul.AspNet-Menu li:hover span,
.PrettyMenu ul.AspNet-Menu li.AspNet-Menu-Hover a,
.PrettyMenu ul.AspNet-Menu li.AspNet-Menu-Hover span,
.PrettyMenu ul.AspNet-Menu li:hover li:hover a,
.PrettyMenu ul.AspNet-Menu li:hover li:hover span,
.PrettyMenu ul.AspNet-Menu li.AspNet-Menu-Hover li.AspNet-Menu-Hover a,
.PrettyMenu ul.AspNet-Menu li.AspNet-Menu-Hover li.AspNet-Menu-Hover span,
.PrettyMenu ul.AspNet-Menu li:hover li:hover ul a:hover,
.PrettyMenu ul.AspNet-Menu li:hover li:hover ul span.Asp-Menu-Hover,
.PrettyMenu ul.AspNet-Menu li.AspNet-Menu-Hover li.AspNet-Menu-Hover ul a:hover,
.PrettyMenu ul.AspNet-Menu li.AspNet-Menu-Hover li.AspNet-Menu-Hover ul span.Asp-Menu-Hover
{
 background-color: #d8d8d8;
    color: black;
}

.PrettyMenu ul.AspNet-Menu li:hover ul a,
.PrettyMenu ul.AspNet-Menu li:hover ul span,
.PrettyMenu ul.AspNet-Menu li.AspNet-Menu-Hover ul a,
.PrettyMenu ul.AspNet-Menu li.AspNet-Menu-Hover ul span,
.PrettyMenu ul.AspNet-Menu li:hover li:hover ul a,
.PrettyMenu ul.AspNet-Menu li:hover li:hover ul span,
.PrettyMenu ul.AspNet-Menu li.AspNet-Menu-Hover li.AspNet-Menu-Hover ul a,
.PrettyMenu ul.AspNet-Menu li.AspNet-Menu-Hover li.AspNet-Menu-Hover ul span
{
 background-color: White;
    color: black;
}

.PrettyMenu ul.AspNet-Menu li a:hover,
.PrettyMenu ul.AspNet-Menu li span.Asp-Menu-Hover
{
 background-color: White;
    color: black;
}

.PrettyMenu ul.AspNet-Menu li.AspNet-Menu-Leaf a:hover
{
    background-image: none;
}
    -->
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <div style="float: left; clear: right; z-index: 500; border: solid 1px red;">
            <asp:Menu ID="Menu1" runat="server" cssselectorclass="PrettyMenu">
                <Items>
                    <asp:MenuItem Text="Fruits">
                        <asp:MenuItem Text="Apple" />
                        <asp:MenuItem Text="Banana" />
                        <asp:MenuItem Text="Orange" />
                        <asp:MenuItem Text="Watermellon" />
                    </asp:MenuItem>
                </Items>
            </asp:Menu>
        </div>
        <div style="float: left; clear: right; z-index: 1; margin-left: 15px; border: solid 1px green;">
            <asp:Menu ID="Menu2" runat="server" cssselectorclass="PrettyMenu">
                <Items>
                    <asp:MenuItem Text="More links">
                        <asp:MenuItem Text="My first link" />
                        <asp:MenuItem Text="And now the second one" />
                        <asp:MenuItem Text="We are up to number three" />
                        <asp:MenuItem Text="Finally there is the fourth" />
                    </asp:MenuItem>                   
                </Items>
            </asp:Menu>
        </div>
    </form>
</body>
</html>

In Visual Studio 2005 SP1 I created a new web site based on the ASP.NET CSS Friendly Web Site template created when I installe the CSS Friendly adapter kit's VSI (http://www.asp.net/cssadapters).  I used the markup shown immediately above in place of the markup originally present in my new web site's Default.aspx file.

When I then run this Default.aspx file from VS I found that the left-most menu's submenu was partially hidden beneath the top tier of the right-most menu. This seems comparable to the problem reported originally in this posting. That's good because it means we have a reproducible case that we can all run.

The problem is a manifestation of a know bug/problem/misunderstanding or different interpretation.  I want to avoid politics here by getting fuzzy on whether or not this is actually a bug in IE.  In any event it is described on the web in lots of places if you know what to search for.  Here's one example:  http://therealcrisp.xs4all.nl/ie7beta/css_zindex.html.

The solution can be pretty simple if you know (and can tolerate) it... put position:relative on the containing <div> tags, too.

In other words, in the markup shown immediately above, you would need to add position:relative in the inline "style" attribute seen on the two <div> tags.  My testing shows that that fixes the problem.  Do you see likewise? Can this "fix" be applied in your situation, too?


Russ Helfand
Groovybits.com
sunscar9536
Asp.Net User
Re: Multiple Menus - Overlay Problem1/12/2007 4:49:54 AM

0/0

Russ,

Thanks for the quick reply... For some reason I had my doubts, but it worked... =) thanks so much for the help.

I didn't know the "position: relative;" would be required for each DIV block.

I do have one more question and this may better as a new post, but is there any option to add a custom icon for a bullet next to each item on the second tier?

Thanks again for your time and help...

Russ Helfand
Asp.Net User
Re: Multiple Menus - Overlay Problem1/13/2007 1:39:45 AM

0/0

Regarding your last question... can you add a custom icon next to each menu item in the second tier?  This has been explored in similar postings like http://forums.asp.net/thread/1448602.aspx.

The basic idea will be to set up each menu item to have a unique ImageUrl value.  The menu adapter is already smart enough to render an <img> tag if the ImageUrl is set for the menu item.

Clear as mud?


Russ Helfand
Groovybits.com
sunscar9536
Asp.Net User
Re: Multiple Menus - Overlay Problem1/15/2007 3:53:46 AM

0/0

Russ,

I followed that post and got it working with this code...

        If e.Item.Text.StartsWith("image_") Then
            e.Item.Text = e.Item.Text.Remove(0, 6)
            e.Item.ImageUrl = "~/Images/" + e.Item.Text.Replace(" ", "") + ".gif"
        End If
This method works best if I want to add a custom icon, but I'm wanting to add the same "bullet.gif" to every menu item... Is there an easier or better method of accomplishing this?
Thanks... 
 
 
Russ Helfand
Asp.Net User
Re: Multiple Menus - Overlay Problem1/15/2007 3:54:54 PM

0/0

If the image isn't changing from one menu item to another, you might consider if you can use that bullet.gif as a background image for the anchor (a tag) or list item (li tag) of the menu.

This is technique that is used by the CSS Friendly adapter kit's menu sample page, http://www.asp.net/cssadapters/menu.aspx. Take a look at that sample page's style sheet, http://www.asp.net/CSSAdapters/srcviewer.aspx?inspect=%2fcssadapters%2fapp_themes%2fbasic%2fmenuexample.css&notree=true.  Notice especially lines 54 or 68.  The former is used to set the background of the list item.  The latter sets the background on the anchor. Bullets are typically set up like line 68 where you set the no-repeat value for the background-position property in CSS.  In these samples, the "bullet" is actually used to indicate whether or not there are submenu items.  In your case, it sounds like you'd use the bullet as a decoration only.  I suppose you'd want to place it to the left of the text of the menu item, so the rule would use "left" not "right" (as the sample currently does).

If none of this works for you, I'd probably stick with the solution (above) that you developed.  Remember that the image itself will be cached by the browser so having the extra IMG tags for it within the <li> won't cause latency problems (i.e., slowness due to crossing again and again betwee the client and server).  On the other hand, if all of hte IMG tags end up pointing at the same image it really is better to handle this will CSS simply to reduce bulk in your markup.

Good luck.


Russ Helfand
Groovybits.com
sunscar9536
Asp.Net User
Re: Multiple Menus - Overlay Problem1/17/2007 3:04:12 PM

0/0

Setting the bground property worked perfect! Thanks....

Now if there was a solution for this one.... http://forums.asp.net/thread/1428996.aspx   =) This seems to be a bit harded to fix.

Thanks for all your help.

12 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
DVD Studio Pro 2: The Complete Guide to DVD Authoring Authors: Bruce Nazarian, Pages: 566, Published: 2004
DVD Authoring & Production Authors: Ralph LaBarge, Inc ebrary, Pages: 477, Published: 2001
DVD Studio Pro 4: The Complete Guide to DVD Authoring with Macintosh Authors: Bruce C. Nazarian, Pages: 536, Published: 2006
Firefox Hacks: Tips & Tools for Next-generation Web Browsing Authors: Nigel McFarlane, Pages: 377, Published: 2005
The Proteomics Protocols Handbook Authors: John M. Walker, Pages: 988, Published: 2005
Adobe Photoshop CS2 Studio Techniques: Studio Techniques Authors: Ben Willmore, Pages: 573, Published: 2005
Inside AutoCAD 2002 Authors: David Harrington, Bill Burchard, David Pitzer, Pages: 1223, Published: 2002
DVD Studio Pro 3 in the Studio: In the Studio Authors: Marc Loy, Pages: 342, Published: 2004

Web:
Multiple Menus - Overlay Problem - ASP.NET Forums Re: Multiple Menus - Overlay Problem. 01-05-2007, 10:45 AM. Contact ... Re: Multiple Menus - Overlay Problem. 01-05-2007, 4:03 PM. Contact ...
Randsco - z-index on a:hover elements I noticed that Stu Nicholl's Photo Gallery Mk.3 doesn't have a z-index overlay problem. Upon closer examination, I understand why. It's not something that I ...
Google Earth Community: Loading multiple overlays not working... Hello - I have the same problem. I cannot load multiple overlays, ... (top screen menu icon list) , then additional overlays are replacing ...
YUI Library Examples: Container Family: Using the Overlay Manager ... OverlayManager allows you to manage multiple Overlays (and Overlay subclasses like Panel, .... Menu Buttons (included with examples for Button Control) ...
Code on Multiple Pages and Site Overlay - Analytics Basics ... I go to site overlay and see the clicks for menu items and pages but I ... Subject: Re: Code on Multiple Pages and Site Overlay ...
SmartMenus DHTML Menu / JavaScript Menu - Online Samples - Overlay ... Image-only Main Menu · Multiple Menu Trees on the Same Page · Custom Sub Menus Styles (CSS classes) ... SmartMenus 6 Add-on: Overlay Objects in Gecko ...
Creative Menus for Dreamweaver Its problem is that it does not overlay the page content when the menus .... If you are using multiple menus with different skins or any ...
Multiple display workstation with conductive surface overlay ... Multiple display workstation with conductive surface overlay control ..... With this separate menu display, the number of regenerations of menus and work ...
Multiple Menus with Drop Zone Navigation Issues : Apple DVD Studio Pro I'm having a few issues with a multiple menu project, and I'm .... make the text part of the frame and then do a simple box as the overlay. ...
XUL Overlays - MDC The layout engine loads any overlay files and then flows the resulting XUL document, so problems associated with incremental insertion in menus, boxes, ...

Videos:
Dauger Research profiled on Keeping America Strong - Part 2 Dauger Research is the proud recipient of the "Keeping America Strong" award, part of a special television broadcast hosted by William Shatner. This ...
Dauger Research profiled on Keeping America Strong Dauger Research is the proud recipient of the "Keeping America Strong" award, part of a special television broadcast hosted by William Shatner. This ...




Search This Site:










web.config not allowing me..

user pass

asp.net_user permissions problem

can i disable the 'help' button of each field of feedback module ( dnn3.2 )

how many lines of code?

backup database into scripts

problem with css layout

missing core modules in 3.1.0

clearing selection history from a tree view

further newbie dnn questions

visual web developer 2008 express closes automatically

adding product functionality/info

using themed css files requires a header control on the page. (e.g. <head runat="server" />).

using sql 2000 for asp.net user data

update web references during build

adding help to custom module

visual studio 2008 installtion help!

dnn 3.0.12 and aspnet_wp.exe memory issues

creating modules as external assemblies

what are breadcrumbs?

newbit sql server questions

attach database manually

user.isinrole issue.

webdeploy and vista

treeview intermittent crash bug -- (solution)

dispalying images

picture gallery

thought on roles & users..

dnn 3.2.2 core authentication module issue?

vs is no longer using declarative event handling! why?

 
All Times Are GMT