CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

ASP.NET Web Hosting – 3 Months Free!



Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 5/9/2005 4:45:09 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 5 Views: 82 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
6 Items, 1 Pages 1 |< << Go >> >|
mjcreamer
Asp.Net User
Using the DynamicMenuStyle on the Menu Control5/9/2005 4:45:09 PM

0/0

I've been using the Menu control to create a horizontal menu.  It looks great but I was to format the dynamic menus just slightly-- with a 1 px border on the left and top and a 2 px border on the right and bottom (for a 3-d effect).

I've created a CSS class to accomplish this:

.dyMenu1

{

border-top:#cdcdcd 1 solid;

border-left:#cdcdcd 1 solid;

border-bottom:#000000 2 solid;

border-right:#000000 2 solid;

}

and then assigned the property inside a Theme:

<DynamicMenuStyle CssClass="dyMenu1" />

 

Which results in the following HTML code being generated:

</table><div id="ctl00_Menu1n1Items" class="aspnet_s0 dyMenu1 aspnet_s8">

 

All of this seems correct but the borders on the DIV just do not display. 

 

Has anyone worked with borders this way that might be able to point me in the right direction?

 

Thanks!

Michael


Michael Creamer
Dave Sussman
Asp.Net User
Re: Using the DynamicMenuStyle on the Menu Control5/10/2005 8:43:01 AM

0/0

Does setting the properties directly on the DynamicMenuStyle element work, as opposed to using a class? I definitely have this working (in beta 2 anyway, there were CSS problems with the beta 1 menu).

Dave

mjcreamer
Asp.Net User
Re: Using the DynamicMenuStyle on the Menu Control5/10/2005 9:13:52 AM

0/0

Yes, I can set the Border, BorderStyle, etc. properties directly (and that works) but I need to have two sides one color and the other two sides another color.

In plain old HTML I would just do:

style="border-left:#cdcdcd 1 solid;border-top:#cdcdcd 1 solid;border-right:#999999 2 solid;border-bottom:#999999 2 solid;"

Is there a way to add a style string like this to the DynamicMenuStyle?

In the resulting HTML I see that there are multiple classes listed:

class="aspnet_s0 dyMenu1 aspnet_s8"

I've never used multiple classes before in this manner (although I see that this is supposed to work according to various articles I've found on the web).  "aspnet_s8", I noticed, is completely blank in the STYLE declaration.

I keep shying away from ASP.NET for just this reason-- I can easily do this in HTML and/or ASP but have a hard time finding the right properties, etc. in ASP.NET.

Thanks for your help!

 


Michael Creamer
Dave Sussman
Asp.Net User
Re: Using the DynamicMenuStyle on the Menu Control5/10/2005 10:54:13 AM

0/0

Here's my Menu declaration for one that works:

<asp:menu id="MyMenu" runat="server" datasourceid="siteData"
 orientation="Vertical"
 staticdisplaylevels="2" StaticSubMenuIndent="0"
 disappearafter="200"

 >
 <DynamicMenuStyle CssClass="dynamicMenu" />
 <DynamicMenuItemStyle CssClass="dynamicMenuItem" />
</asp:menu>

And the styles are:

.dynamicMenu {
    background-color:#a83930;
    border-color: #fdea12;
    border-style: solid;
    border-width: 1px;
}
.dynamicMenuItem
{
    background-color: #a83930;
    border-color: #fdea12;
    border-style: solid;
    border-width: 1px;
}

There's a ton of other styling for the rest of the page and layout, but the menu works fine. I'm currently repaving my laptop so can't boot into the beta 2 partition at the moment otherwise I'd test out your code.

Dave

mjcreamer
Asp.Net User
Re: Using the DynamicMenuStyle on the Menu Control5/10/2005 1:22:56 PM

0/0

Very bizzare.

When I replace my styles code with yours, your border displays just fine.

It seems that something is preventing the "border-left, border-right, etc." items from being displayed.  (I created a standalone HTML page with the "border-left, border-right, etc." and it works just fine.

I took a look at the generated JavaScript but could not locate anything that is suspicious.  I'm thinking that there must be something in there that is removing the className from the code when it changes the display to visible.

Thanks for your help.  Let me know if you think of anything else that might be the culprit.

Michael

 


Michael Creamer
mjcreamer
Asp.Net User
Re: Using the DynamicMenuStyle on the Menu Control5/10/2005 1:33:44 PM

0/0

I figured it out.

I was leaving off the "px" on the width designation.  Once I added it, it works great.

(I don't normally add the "px" and it had always worked fine.... interesting.)

Thanks again for your help!


Michael Creamer
6 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Pro ASP.NET 3.5 in C# 2008 Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1498, Published: 2007
Beginning ASP.NET 3.5 in C# 2008: From Novice to Professional Authors: Matthew MacDonald, Pages: 954, Published: 2007
Pro ASP.NET 2.0 in VB 2005: From Professional to Expert Authors: Laurence Moroney, Matthew MacDonald, Pages: 1253, Published: 2006
Beginning ASP.NET 2.0 in VB 2005: From Novice to Professional Authors: Matthew MacDonald, Pages: 1063, Published: 2006
Professional ASP.NET 2.0 Authors: Bill Evjen, Scott Hanselman, Farhan Muhammad, Srinivasa Sivakumar, Devin Rader, Pages: 1253, Published: 2005
Pro ASP.NET 2.0 in C# 2005: Create Next-generation Web Applications with the Latest Version of Microsoft's Revolutionary Technology Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1426, Published: 2006
Pro ASP.NET 2.0 in C# 2005 Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1255, Published: 2005
Beginning ASP.NET 2.0 with C# Authors: Chris Hart, John Kauffman, David Sussman, Chris Ullman, Pages: 735, Published: 2006
Professional ASP.NET 3.5: In C# and VB Authors: Bill Evjen, Scott Hanselman, Devin Rader, Pages: 1673, Published: 2008
Beginning ASP.NET 2.0 Authors: Chris Hart, John Kauffman, Chris Ullman, David Sussman, Pages: 759, Published: 2005

Web:
Using the DynamicMenuStyle on the Menu Control - ASP.NET Forums Re: Using the DynamicMenuStyle on the Menu Control ... Re: Using the DynamicMenuStyle on the Menu Control ...
Using CSS and Styles with the Menu Control This topic introduces the types of styles exposed by the Menu control and suggests ... For example, if you specified a border using the DynamicMenuStyle ...
DotNetSlackers: Using Device Filters (and making Menu work with ... Nov 21, 2005 ... Using Device Filters (and making Menu work with Safari) ... If you specify a DynamicMenuStyle (or LevelSubMenuStyles) on the Menu control, ...
Setting transparent background for DynamicMenuStyle Menu Setting transparent background for DynamicMenuStyle Menu. Hi, I am using a ASP. NET 2.0 Menu control and would like the dynamic menu to ...
Menu Control - DynamicMenuStyle not rendering correctly when ... Menu Control - DynamicMenuStyle not rendering correctly when specifying ... (I considered just dropping the image and using a colored box. ...
Menu.DynamicMenuStyle Property (System.Web.UI.WebControls) Use the DynamicMenuStyle property to control the appearance of a dynamic menu. This property is read-only; however, you can set the properties of the ...
Visual Studio .NET 2003 Web Control for Milonic Menu I developed the control using the .NET Framework v1.1, using VS.NET 2003 IDE. ... create new menu style control. DynamicMenuStyle. ...
ASP.NET 2.0: Using the Menu Control NET 2.0 : Using the Menu Control by Peter A. Bromberg, Ph.D. ... CssClass=" toolbar" />     ...
Static menu using asp:menu control « Tech Dec 6, 2007 ... Each menuitem is specified using the tag. Multiple level menus can be easily designed using the asp menu control. ...
Using Device Filters (and making Menu work with Safari) - -[Danny ... If you specify a DynamicMenuStyle (or LevelSubMenuStyles) on the Menu control, sub menus seem to disappear on "downlevel" browsers. ...




Search This Site:










trouble with displaying bitmap on webform

themes, themes, themes

master page problem when not in same folder level with aspx page

ie cannot open my localhost page - operation aborted - but firefox works fine

can't able to access a master page from a folder

calling masterpage method from a class

asp menu

menu not rendering correctly

session expired/logout using logincontrol c#

treeview as navigation; automatically select node?

server.urlencode error messege

how to share master page among applications?

treeview - admin view

second level of menu

causes validation property not present in menu navigation control

getting the name of the child or calling page from the .master.cs code behind

asp panel is under updatepanel in firefox

site navigation

javascript references in a masterpage file

accessing label in contentplaceholder in masterpage from a page

using common buttons....

insert javascript file in master page

reload sitemap

how to disable links in sitemappath?

sitemapdatasource and treeview

css problem

alignment of content when linked to a master page

control asp.net menu??

how do i properly use the menu control with xml?

menu staticsubmenu text wrap not aligning propely

  Privacy | Contact Us
All Times Are GMT