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: 10/20/2006 2:35:54 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 62 Views: 44 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
63 Items, 4 Pages 1 2 3 4 |< << Go >> >|
rfurdzik
Asp.Net User
two level tab menu10/20/2006 2:35:54 AM

0/0

I have noticed thsi forum, I post in some other before...

How can I create tab menu with two bars, similar to the one on Auctiva.com using menu control and cSS adapters?

First bar: Tabs

 

Second bar Links (second level, children of the item first selected in the tab above). The ain tab should be highlighted

Seems like it is a cool new trend to have this kind of menu, suprised i could not find any solutuions to this...


Rafal
Zikbay.com - The Best Free Online Classifieds


DNN Direct
rfurdzik
Asp.Net User
Re: two level tab menu10/20/2006 3:41:26 AM

0/0

I have downloaded the CSS Adapter sample kit, I thought that by commenting some lines of code in the adapter, it would make the second level menu to apear horizonla as opposed to vertical, but it does not work for some reason. This is the lines I have commented out (no change in behaviour)

//if (((item.Depth < menu.StaticDisplayLevels) && (menu.StaticItemTemplate != null)) ||

// ((item.Depth >= menu.StaticDisplayLevels) && (menu.DynamicItemTemplate != null)))

//{

// writer.WriteBeginTag("div");

// writer.WriteAttribute("class", GetItemClass(menu, item));

// writer.Write(HtmlTextWriter.TagRightChar);

// writer.Indent++;

// writer.WriteLine();

// MenuItemTemplateContainer container = new MenuItemTemplateContainer(menu.Items.IndexOf(item), item);

// if ((item.Depth < menu.StaticDisplayLevels) && (menu.StaticItemTemplate != null))

// {

// menu.StaticItemTemplate.InstantiateIn(container);

// }

// else

// {

// menu.DynamicItemTemplate.InstantiateIn(container);

// }

// container.DataBind();

// container.RenderControl(writer);

// writer.Indent--;

// writer.WriteLine();

// writer.WriteEndTag("div");

//}

//else


Rafal
Zikbay.com - The Best Free Online Classifieds


DNN Direct
rfurdzik
Asp.Net User
Re: two level tab menu10/20/2006 11:57:36 AM

0/0

Just for clarification.

The first bar is just buttons, the second bar of the menu is links only. They both work together. It is like the first bar is the first level of menu display, th second bar is the secon level, instead of popup menu...

I have a feeling this should be possible to do using CSS adapters. I think I would need to change the menu adapter code somehow to output second level menu as links of bar below the first level of tabs. Than CSS would need to be modified as well.

I am not sure what exactly I will need to change and if my idea is correct. Can somebody give me a hint? I rellay appreaciate it. thanks,

 

 


Rafal
Zikbay.com - The Best Free Online Classifieds


DNN Direct
rfurdzik
Asp.Net User
Re: two level tab menu10/20/2006 9:14:53 PM

0/0

I found CSs for the type of menu I want, here: http://www.cssplay.co.uk/menus/drop_line.html

 I am not clear if I need to change any code of the menu adapter, I was thinking I may need to remove the div wrapping, but not sure.

Also the CSS in the example above dos not make the secon bar to stay once I click on the first bar. It only shows once the mouse is over theitem in the first bar...

 


Rafal
Zikbay.com - The Best Free Online Classifieds


DNN Direct
rfurdzik
Asp.Net User
Re: two level tab menu10/22/2006 8:38:12 PM

0/0

The problem I see doing this by using CSS adapters is that the second levl menu (bar underneath of the first menu). The problem is that CSS will only show the second menu when you hover over it. I want to show second bar when you click on the first menu.

Is it possible to do it at all using CSS adapters?

 Please see www.auctiva.com for example of two bar menu


Rafal
Zikbay.com - The Best Free Online Classifieds


DNN Direct
Russ Helfand
Asp.Net User
Re: two level tab menu10/25/2006 12:01:22 AM

0/0

Sorry, the adapters only support StaticDisplayLevels=1.
Russ Helfand
Groovybits.com
rfurdzik
Asp.Net User
Re: two level tab menu10/25/2006 2:27:55 AM

0/0

Yes, but can the adapter code be changed?

 


Rafal
Zikbay.com - The Best Free Online Classifieds


DNN Direct
Russ Helfand
Asp.Net User
Re: two level tab menu10/25/2006 3:52:34 AM

0/0

Potentially, yes.  :) 

I know you suggested some code mods earlier.  I'd prefer to put that aside for a moment and revisit the question of whether or not it might be possible to accomplish a multi-level static menu changing just the CSS.

Fundamentally, you need to always make the CSS "display" property be "block" not "none" on second tier unordered lists (ul tags).

ul ul
{
display:block !important;
}

Of course, you probably need to qualify that rule by saying that it only applies with some div with an id like foo.

#foo ul ul
{
display:block !important;
}

Given this information, can you help me brainstorm on where we would go next?


Russ Helfand
Groovybits.com
rfurdzik
Asp.Net User
Re: two level tab menu10/25/2006 4:07:59 AM

0/0

I will try to play with this CSS, I am new to  CSS... I guess I need to find out whatCSS classes to change exactly in the menu.css, which comes with CSS adapters... I would think that the second level menu could display horizontally as links, however will it stay there once I move the mouse from it?

Please see some websites for example: www.auctiva.com, www.buysellcommunity. www.half.com

They all have first menu as tabs, second level as links. Please take a look and you will know what I mean. I feel I may need to modify the code for that functinality, yet I have to figure out what I need to change...


Rafal
Zikbay.com - The Best Free Online Classifieds


DNN Direct
rfurdzik
Asp.Net User
Re: two level tab menu10/25/2006 4:10:48 AM

0/0

Oh by the way, how did you get your website name to display below user name in your posts? Thanks,

Rafal


Rafal
Zikbay.com - The Best Free Online Classifieds


DNN Direct
rfurdzik
Asp.Net User
Re: two level tab menu10/28/2006 3:34:58 AM

0/0

I have tried that CSS and put it into Sampe Menu:

.SimpleEntertainmentMenu ul.AspNet-Menu ul

{

width: 130px;

left: 3px;

top: 1.7em;

display:block;

}

 

This is not even close to what is on Auctiva.com. I think it should be possible to do with a combination of CSS and code change...

Two bars:

1) Regular menu at the top

2) links as submenu items, displayed horizontal way

3) All done as menu control + CSS adapters


Rafal
Zikbay.com - The Best Free Online Classifieds


DNN Direct
rfurdzik
Asp.Net User
Re: two level tab menu10/28/2006 3:56:00 AM

0/0

This menu: http://www.cssplay.co.uk/menus/drop_line.html#nogo is very close to what I want to achieve. The only difference is that I want the submenu o stay all the time, unless other main menu item cliked of course...

Can this be done with CSS adapters? Waht changes do I need to do to the sample menu included in the toolkit?


Rafal
Zikbay.com - The Best Free Online Classifieds


DNN Direct
rfurdzik
Asp.Net User
Re: two level tab menu10/29/2006 1:11:03 AM

0/0

After doing some reading (whitepaper etc) I came to conclusion that I need to modify menu.css in the Simple Menu example, which comes with the toolkit.

I think that is the way to go, I am new to CSS, but hopefully can figure it out. As a first step I will transform the existing menu.css intousing this sample CSS:

.menu {
position:relative;
width:750px;
height:2em;
background:#b7c6ac;
border-top:10px solid #b7c6ac;
padding-bottom:1px;
background:#b7c6ac url(drop/line.gif) bottom left repeat-x;
margin-bottom:5em;
}

* html .menu {padding-bottom:0;}

.menu ul{
list-style-type:none;
padding:0;
margin:0 0 0 20px;
width:730px;
height:100%;
}

.menu li{
float:left;
}

.menu table{
position:absolute;
border-collapse:collapse;
left:0;
top:0;
}

.menu a, .menu :visited {
color:#fff;
text-decoration:none;
}
.menu a em.lft, .menu :visited em.lft {
display:block;
float:left;
width:5px;
height:2em;
background: transparent url(drop/lefta.gif);
border-bottom:1px solid #777;
}
.menu a b, .menu :visited b {
display:block;
font-weight:normal;
float:left;
padding:0 10px;
height:2em;line-height:1.9em;
background: transparent url(drop/mida.gif);
cursor:pointer;
border-bottom:1px solid #777;
}
.menu a em.rgt, .menu :visited em.rgt {
display:block;
float:left;
width:5px;
height:2em;
background: transparent url(drop/righta.gif);
border-bottom:1px solid #777;
}

.menu ul ul {
visibility:hidden;
position:absolute;
height:2em;
top:2em;
left:-20px;
width:749px;
border-bottom:1px solid #777;
border-right:1px solid #777;
background:#ccc;
}

.menu :hover {
white-space:normal;
}

.menu a:hover b {
color:#000;
background: transparent url(drop/midb.gif);
border-bottom-color:#ccc;
}
.menu a:hover em.lft {
background: transparent url(drop/leftb.gif);
border-bottom-color:#ccc;
}
.menu a:hover em.rgt {
background: transparent url(drop/rightb.gif);
border-bottom-color:#ccc;
}

.menu li:hover > a b
{
color:#000;
background: transparent url(drop/midb.gif);
border-bottom-color:#ccc;
}
.menu li:hover > a em.lft {
background: transparent url(drop/leftb.gif);
border-bottom-color:#ccc;
}
.menu li:hover > a em.rgt {
background: transparent url(drop/rightb.gif);
border-bottom-color:#ccc;
}
.menu ul li:hover ul,
.menu ul a:hover ul{
display:block;
visibility:visible;
top:2em;
margin-top:1px;
}

.menu ul :hover ul li {
display:block;
border-left:1px solid #777;
background:#ccc;
height:2em;
}
.menu ul :hover ul li a {
display:block;
font-size:0.8em;
height:2em;
line-height:2.5em;
width:auto;
float:left;
color:#444;
padding:0 10px;}
.menu ul :hover ul li a:hover {
color:#c00;
}
</style>

I am not sure yet of all the syntax nuances, but will dig into that. Also my other concern is how to make the menu to stay once I hover over the main menu (first ul li). I am not sure if I can achieve this with pore CSS or do I need to use java script for that. Any recommendation will be apprecaited. Please let me know if I am heading in the right direction.

 

Will keep you updated.


Rafal
Zikbay.com - The Best Free Online Classifieds


DNN Direct
rfurdzik
Asp.Net User
Re: two level tab menu10/29/2006 2:05:33 AM

0/0

I forgot to provide html, it is little bit different than the one created by menu adapter...

<ul id="sub_menu">


<li class="home"><a href="../index.html"  accesskey="H" title="Home Page">Home</a></li>

<li class="first"><a href="index.html" accesskey="F" title="First - Section List">First</a></li><li class="previous"><a href="dd_valid_2.html" accesskey="P" title="Previous">Previous</a></li><li class="next"><a href="basic_dd.html" accesskey="N" title="Next">Next</a></li><li class="last"><a href="vertical_slide.html" accesskey="L" title="Last">Last</a></li>
<li class="comments"><a href="http://www.cssplay.co.uk/comments/comments.php?comment_id=CSS%20drop-line%202"  accesskey="C" title="Comments for this page">COMMENTS</a></li>

<li class="tutorial_off">&nbsp;</li></ul>

</div> <!-- end of page_head -->
<div id="info">

<h2>A drop-line cascading menu v2</h2>
<h3>11th October 2006</h3>

<div class="menu">
<ul>
<li><a href="http://forums.asp.net/AddPost.aspx?PostID=1444780#nogo" title="John Constable"><em class="lft"></em><b>John Constable</b><em class="rgt"></em><!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
<ul>
<li><a href="http://forums.asp.net/AddPost.aspx?PostID=1444780#nogo" title="The Hay Wain">The Hay Wain</a></li>
<li><a href="http://forums.asp.net/AddPost.aspx?PostID=1444780#nogo" title="Brighton Beach">Brighton Beach</a></li>
<li><a href="http://forums.asp.net/AddPost.aspx?PostID=1444780#nogo" title="Malvern Hall">Malvern Hall</a></li>
<li><a href="http://forums.asp.net/AddPost.aspx?PostID=1444780#nogo" title="Salisbury Cathedral">Salisbury Cathedral</a></li>
<li><a href="http://forums.asp.net/AddPost.aspx?PostID=1444780#nogo" title="Weymouth Bay">Weymouth Bay</a></li>
</ul>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li>
<li><a href="http://forums.asp.net/AddPost.aspx?PostID=1444780#nogo" title="William Turner"><em class="lft"></em><b>William Turner</b><em class="rgt"></em><!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
<ul>
<li><a href="http://forums.asp.net/AddPost.aspx?PostID=1444780#nogo" title="Fishermen at Sea">Fishermen at Sea</a></li>
<li><a href="http://forums.asp.net/AddPost.aspx?PostID=1444780#nogo" title="The Shipwreck">The Shipwreck</a></li>
<li><a href="http://forums.asp.net/AddPost.aspx?PostID=1444780#nogo" title="The Vale of Ashburnham">The Vale of Ashburnham</a></li>
<li><a href="http://forums.asp.net/AddPost.aspx?PostID=1444780#nogo" title="Crossing the Brook">Crossing the Brook</a></li>
</ul>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li>
<li><a href="http://forums.asp.net/AddPost.aspx?PostID=1444780#nogo" title="Henri Matisse"><em class="lft"></em><b>Henri Matisse</b><em class="rgt"></em><!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
<ul>
<li><a href="http://forums.asp.net/AddPost.aspx?PostID=1444780#nogo" title="The Girl with Green Eyes">The Girl with Green Eyes</a></li>
<li><a href="http://forums.asp.net/AddPost.aspx?PostID=1444780#nogo" title="The Dream">The Dream</a></li>
<li><a href="http://forums.asp.net/AddPost.aspx?PostID=1444780#nogo" title="Woman in Blue">Woman in Blue</a></li>
<li><a href="http://forums.asp.net/AddPost.aspx?PostID=1444780#nogo" title="The Yellow Dress">The Yellow Dress</a></li>
</ul>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li>
<li><a href="http://forums.asp.net/AddPost.aspx?PostID=1444780#nogo" title="Paul Cezanne"><em class="lft"></em><b>Paul Cezanne</b><em class="rgt"></em><!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
<ul>
<li><a href="http://forums.asp.net/AddPost.aspx?PostID=1444780#nogo" title="The Large Bathers">The Large Bathers</a></li>
<li><a href="http://forums.asp.net/AddPost.aspx?PostID=1444780#nogo" title="Onions and Bottles">Onions and Bottles</a></li>
<li><a href="http://forums.asp.net/AddPost.aspx?PostID=1444780#nogo" title="Mardi Gras">Mardi Gras</a></li>
<li><a href="http://forums.asp.net/AddPost.aspx?PostID=1444780#nogo" title="Still Life">Still Life</a></li>
<li><a href="http://forums.asp.net/AddPost.aspx?PostID=1444780#nogo" title="Boy in a Red Waistcoat">Boy in a Red Waistcoat</a></li>
</ul>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li>
</ul>


Rafal
Zikbay.com - The Best Free Online Classifieds


DNN Direct
rfurdzik
Asp.Net User
Re: two level tab menu10/29/2006 3:10:45 AM

0/0

This is the CSS I got so far, it is the CSS for the simple menu included in the toolkit. I have modified aspx page to have only this one included, I will seperate it later into two files (base functionality and look).

And of course it looks like crap now, much different than http://www.cssplay.co.uk/menus/drop_line.html. Wonder if somebody can help sort it out, I am struggling with CSS:

.foo {} /* W3C CSS validator likes CSS files to start with a class rather than a comment. Soooooo.... */

/* This style sheet is intended to contain RARELY CHANGED rules used when the Menu control adapter is enabled. */

/* These rules correspond to the "pure CSS menu" technique that have been evolving over the past several years. */

/* See WhitePaper.aspx for details. */

.AspNet-Menu

{

position: relative;

width:750px;

height:2em;

background:#b7c6ac;

border-top:10px solid #b7c6ac;

padding-bottom:1px;

background:#b7c6ac url(menu/line.gif) bottom left repeat-x;

margin-bottom:5em;

}

* html .AspNet-Menu {padding-bottom:0;}

.AspNet-Menu ul{

list-style-type:none;

padding:0;

margin:0 0 0 20px;

width:730px;

height:100%;

}

.AspNet-Menu li{

float:left;

}

.AspNet-Menu table{

position:absolute;

border-collapse:collapse;

left:0;

top:0;

}

 

 

.AspNet-Menu a, .AspNet-Menu :visited {

color:#fff;

text-decoration:none;

}

.AspNet-Menu a em.lft, .AspNet-Menu :visited em.lft {

display:block;

float:left;

width:5px;

height:2em;

background: transparent url(drop/lefta.gif);

border-bottom:1px solid #777;

}

.AspNet-Menu a b, .AspNet-Menu :visited b {

display:block;

font-weight:normal;

float:left;

padding:0 10px;

height:2em;line-height:1.9em;

background: transparent url(drop/mida.gif);

cursor:pointer;

border-bottom:1px solid #777;

}

.AspNet-Menu a em.rgt, .AspNet-Menu :visited em.rgt {

display:block;

float:left;

width:5px;

height:2em;

background: transparent url(drop/righta.gif);

border-bottom:1px solid #777;

}

.AspNet-Menu ul ul

{

visibility:hidden;

position:absolute;

height:2em;

top:2em;

left:-20px;

width:749px;

border-bottom:1px solid #777;

border-right:1px solid #777;

background:#ccc;

}

 

.AspNet-Menu a b, .AspNet-Menu :visited b {

display:block;

font-weight:normal;

float:left;

padding:0 10px;

height:2em;line-height:1.9em;

background: transparent url(menu/mida.gif);

cursor:pointer;

border-bottom:1px solid #777;

}

.AspNet-Menu :hover {

white-space:normal;

}

.AspNet-Menu a:hover b {

color:#000;

background: transparent url(drop/midb.gif);

border-bottom-color:#ccc;

}

.AspNet-Menu a:hover em.lft {

background: transparent url(drop/leftb.gif);

border-bottom-color:#ccc;

}

.AspNet-Menu a:hover em.rgt {

background: transparent url(drop/rightb.gif);

border-bottom-color:#ccc;

}

.AspNet-Menu li:hover > a b

{

color:#000;

background: transparent url(drop/midb.gif);

border-bottom-color:#ccc;

}

.AspNet-Menu li:hover > a em.lft {

background: transparent url(drop/leftb.gif);

border-bottom-color:#ccc;

}

.AspNet-Menu li:hover > a em.rgt {

background: transparent url(drop/rightb.gif);

border-bottom-color:#ccc;

}

.AspNet-Menu ul li:hover ul,

.AspNet-Menu ul a:hover ul{

display:block;

visibility:visible;

top:2em;

margin-top:1px;

}

.AspNet-Menu ul :hover ul li {

display:block;

border-left:1px solid #777;

background:#ccc;

height:2em;

}

.AspNet-Menu ul :hover ul li a {

display:block;

font-size:0.8em;

height:2em;

line-height:2.5em;

width:auto;

float:left;

color:#444;

padding:0 10px;}

.AspNet-Menu ul :hover ul li a:hover {

color:#c00;

}


Rafal
Zikbay.com - The Best Free Online Classifieds


DNN Direct
rfurdzik
Asp.Net User
Re: two level tab menu10/29/2006 3:38:40 AM

0/0

OK, I have clean up the aspx page. It looks better, but still not close to : http://www.cssplay.co.uk/menus/drop_line.html#nogo is

<head runat="server">

<%-- <link rel="stylesheet" href="SimpleMenu.css" type="text/css" />

--%> <link runat="server" rel="stylesheet" href="~/CSS/Menu.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]-->

<!--[if gt IE 6]>

<link runat="server" rel="stylesheet" href="~/CSS/BrowserSpecific/IEMenu7.css" type="text/css" id="IEMenu7CSS" />

<![endif]--> --%>

</head>

Here is the updated CSS:

.foo {} /* W3C CSS validator likes CSS files to start with a class rather than a comment. Soooooo.... */

/* This style sheet is intended to contain RARELY CHANGED rules used when the Menu control adapter is enabled. */

/* These rules correspond to the "pure CSS menu" technique that have been evolving over the past several years. */

/* See WhitePaper.aspx for details. */

.AspNet-Menu

{

position: relative;

width:750px;

height:2em;

background:#b7c6ac;

border-top:10px solid #b7c6ac;

padding-bottom:1px;

background:#b7c6ac url(menu/line.gif) bottom left repeat-x;

margin-bottom:5em;

}

* html .AspNet-Menu {padding-bottom:0;}

.AspNet-Menu ul{

list-style-type:none;

padding:0;

margin:0 0 0 20px;

width:730px;

height:100%;

}

.AspNet-Menu li{

float:left;

}

.AspNet-Menu table{

position:absolute;

border-collapse:collapse;

left:0;

top:0;

}

 

 

.AspNet-Menu a, .AspNet-Menu :visited {

color:#fff;

text-decoration:none;

}

.AspNet-Menu a em.lft, .AspNet-Menu :visited em.lft {

display:block;

float:left;

width:5px;

height:2em;

background: transparent url(menu/lefta.gif);

border-bottom:1px solid #777;

}

.AspNet-Menu a b, .AspNet-Menu :visited b {

display:block;

font-weight:normal;

float:left;

padding:0 10px;

height:2em;line-height:1.9em;

background: transparent url(menu/mida.gif);

cursor:pointer;

border-bottom:1px solid #777;

}

.AspNet-Menu a em.rgt, .AspNet-Menu :visited em.rgt {

display:block;

float:left;

width:5px;

height:2em;

background: transparent url(menu/righta.gif);

border-bottom:1px solid #777;

}

.AspNet-Menu ul ul

{

visibility:hidden;

position:absolute;

height:2em;

top:2em;

left:-20px;

width:749px;

border-bottom:1px solid #777;

border-right:1px solid #777;

background:#ccc;

}

 

 

.AspNet-Menu :hover {

white-space:normal;

}

.AspNet-Menu a:hover b {

color:#000;

background: transparent url(drop/midb.gif);

border-bottom-color:#ccc;

}

.AspNet-Menu a:hover em.lft {

background: transparent url(drop/leftb.gif);

border-bottom-color:#ccc;

}

.AspNet-Menu a:hover em.rgt {

background: transparent url(drop/rightb.gif);

border-bottom-color:#ccc;

}

.AspNet-Menu li:hover > a b

{

color:#000;

background: transparent url(menu/midb.gif);

border-bottom-color:#ccc;

}

.AspNet-Menu li:hover > a em.lft {

background: transparent url(menu/leftb.gif);

border-bottom-color:#ccc;

}

.AspNet-Menu li:hover > a em.rgt {

background: transparent url(menu/rightb.gif);

border-bottom-color:#ccc;

}

.AspNet-Menu ul li:hover ul,

.AspNet-Menu ul a:hover ul{

display:block;

visibility:visible;

top:2em;

margin-top:1px;

}

.AspNet-Menu ul :hover ul li {

display:block;

border-left:1px solid #777;

background:#ccc;

height:2em;

}

.AspNet-Menu ul :hover ul li a {

display:block;

font-size:0.8em;

height:2em;

line-height:2.5em;

width:auto;

float:left;

color:#444;

padding:0 10px;}

.AspNet-Menu ul :hover ul li a:hover {

color:#c00;

}


Rafal
Zikbay.com - The Best Free Online Classifieds


DNN Direct
rfurdzik
Asp.Net User
Re: two level tab menu10/29/2006 8:21:01 PM

0/0

OK, after I figured out what each class is responsible for, I got everything mapped!!! Here is a working sample: http://www.dnndirect.com/CssAdaptersTutorial/WalkThru/Simplemenu.aspx

 Seems like I almost got the menu from http://www.cssplay.co.uk/menus/drop_line.html#nogo, which works with sample walkthrough menu example from CSS adapters toolkit. The remaining pieces of work are:

1) Make graphics preattier (experiment with different styles)

2) Split CSS into functional and presentational part (hope somebody can help). I am unclear how to do that split...

3) Create elm.lft and elm.rght. I think each main menu "a" element has to be wrapped with those tags... In order to do it I think I will need to modify CSS adapter' source code... Please let me know what you think

4) That is the most important! Make the second level menu to stay, I am not sure how to acomplish this, I guess this deserves a seperate thread... Right now it disapears once I move the mouse out. Not sure if I can acomplish this with CSS only or do i need to write somw java script...

 

Here is the final CSS (please feel free to use it):

.foo {} /* W3C CSS validator likes CSS files to start with a class rather than a comment. Soooooo.... */

/* This style sheet is intended to contain RARELY CHANGED rules used when the Menu control adapter is enabled. */

/* These rules correspond to the "pure CSS menu" technique that have been evolving over the past several years. */

/* See WhitePaper.aspx for details. */

.AspNet-Menu

{

position: relative;

width:750px;

height:2em;

background:#b7c6ac;

border-top:10px solid #b7c6ac;

padding-bottom:1px;

background:#b7c6ac url(menu/line.gif) bottom left repeat-x;

margin-bottom:5em;

}

* html .AspNet-Menu {padding-bottom:0;}

.AspNet-Menu ul{

list-style-type:none;

padding:0;

margin:0 0 0 20px;

width:730px;

height:100%;

}

.AspNet-Menu li{

float:left;

}

.AspNet-Menu table{

position:absolute;

border-collapse:collapse;

left:0;

top:0;

}

 

/* properties of the text in the cell of the first line of the menu */

ul.AspNet-Menu li a, ul.AspNet-Menu li span, .AspNet-Menu :visited {

color:#fff;

text-decoration:none;

}

.AspNet-Menu a em.lft, .AspNet-Menu :visited em.lft {

display:block;

float:left;

width:5px;

height:2em;

background: transparent url(menu/lefta.gif);

border-bottom:1px solid #777;

}

ul.AspNet-Menu li, .AspNet-Menu :visited {

display:block;

font-weight:normal;

float:left;

padding:0 10px;

height:2em;line-height:1.9em;

background: transparent url(menu/mida.gif);

cursor:pointer;

border-bottom:1px solid #777;

}

.AspNet-Menu a em.rgt, .AspNet-Menu :visited em.rgt {

display:block;

float:left;

width:5px;

height:2em;

background: transparent url(menu/righta.gif);

border-bottom:1px solid #777;

}

ul.AspNet-Menu ul

{

visibility:hidden;

position:absolute;

height:2em;

top:2em;

left:-20px;

width:749px;

border-bottom:1px solid #777;

border-right:1px solid #777;

background:#ccc;

}

 

 

.AspNet-Menu :hover {

white-space:normal;

}

/* when hover over the text in the first line of menu, sets properties of menu item text*/

/*TO DO embed em.lft and em.rgt tags in the adapter code, wrap each top level tag in it... */

ul.AspNet-Menu a:hover, ul.AspNet-Menu span:hover{

color:red;

background: transparent url(drop/midb.gif);

border-bottom-color:#000;

}

.AspNet-Menu a:hover em.lft {

background: transparent url(drop/leftb.gif);

border-bottom-color:#ccc;

}

.AspNet-Menu a:hover em.rgt {

background: transparent url(drop/rightb.gif);

border-bottom-color:#ccc;

}

/* when hover over the menu cell in the first line of menu, sets properties of menu cell*/

ul.AspNet-Menu li:hover

{

color:#000;

background: transparent url(menu/midb.gif);

border-bottom-color:#000;

}

.AspNet-Menu li:hover > a em.lft {

background: transparent url(menu/leftb.gif);

border-bottom-color:#ccc;

}

.AspNet-Menu li:hover > a em.rgt {

background: transparent url(menu/rightb.gif);

border-bottom-color:#ccc;

}

/* controls how the second line of menu is displayed once hover over menu item in the first line of menu */

 

ul.AspNet-Menu li:hover ul,

ul.AspNet-Menu a:hover ul{

display: block;

visibility: visible;

top: 2em;

margin-top: 1px;

}

/* hover over the main menu, sets properties of a each item in the second line of menu */

ul.AspNet-Menu :hover ul li {

display:block;

border-left:1px solid #777;

background:#ccc;

height:2em;

}

/* hover over the main menu, sets properties of a link in the second line of menu */

ul.AspNet-Menu :hover ul li a {

display:block;

font-size:0.8em;

height:2em;

line-height:2.5em;

width:auto;

float:left;

color:black;

padding:0 10px;}

/* hover over the main menu and hover over the link in the second line of menu, sets color of link */

ul.AspNet-Menu :hover ul li a:hover {

color:red;

}


Rafal
Zikbay.com - The Best Free Online Classifieds


DNN Direct
kbghost
Asp.Net User
Re: two level tab menu12/5/2006 7:25:07 PM

0/0

hey rfurdzik, did you ever figure out how to do this?
rfurdzik
Asp.Net User
Re: two level tab menu12/5/2006 9:37:19 PM

0/0

Russ Helfand
Asp.Net User
Re: two level tab menu12/5/2006 10:13:11 PM

0/0

Hi.  I haven't been paying enough attention to this thread.  It sounds like there's a lot of frustration mounting here.  If you don't mind, I'd like to brainstorm with you a little with the hopes of getting you past this difficulty.

I took a look at some pages that were mentioned in the beginning of this thread.  I sort of get what you are hoping to do.  To make it easier, though, it would be great if we could develop a simple ASPX page's markup and post it here so we can all work from the same exact example in a way that we can control.

It seems like you want to show two tiers simultaneously.  It also sounds like you want the second tier to correspond to the current page, rather than being something that changes as you hover over the top tier menu items.  Is that correct?

If so, then you need to start looking at a couple of things.  You need to handle both tiers essentially the same as a top-tier horizontal menu in the sample menus.  And, you need to carefully make sure that the right top tier menu item is marked as "selected" so it corresponds with the current page.  If the menu posts back you will get that selection marking for free.  I suspect, though that your menu is not posting back when it navigates.  It is just usin some urls that you set up in your sitemap.  Those don't post back when you navigate.  They do simple HTTP GET request/response.  Anyway, you'll probably need set up your Selected menu item in your OnMenuItemDataBinding event in the menu.  Something like this:

    <asp:Menu ID="products" runat="server" CssSelectorClass="prodmenu" DataSourceID="prodlistDS" OnMenuItemDataBound="OnProductsMenuItemDataBound">


    protected void OnProductsMenuItemDataBound(object sender, MenuEventArgs e)
    {
        if (e.Item != null)
        {
            if (Request.Url.PathAndQuery == e.Item.NavigateUrl)
            {
               e.Item.Selected = true;
            }
        }
    }

That should set you up to be able to use the adapter's AspNet-Menu-ParentSelected class.  You'll find that when you select a top-tier menu item it marks its child menus with AspNet-Menu-ParentSelected.  So, you can take advantage of that to add some "important" rules to your CSS to force the second tier LI marked with AspNet-Menu-ParentSelected to be always display:block and visibility:visible (effectively overriding what is going on in CSS\Menu.css by using extra rules that are marked with !important so they always take precedence).

OK, that should get you started.  Write back and I'll try to work with you on "next steps" to deal with whatever problems you run into.  Good luck and best regards.  Sorry that I've sort of ignored this problem for a while.  I'll try to be more helpful (though I hope you understand that no one pays for me to do this... it's on my dime, so to speak... same as everyone else on this forum).


Russ Helfand
Groovybits.com
63 Items, 4 Pages 1 2 3 4 |< << Go >> >|


Free Download:

Books:
Creating Web Sites: The Missing Manual Authors: Matthew MacDonald, Pages: 548, Published: 2005
Exploring Interface Design Authors: Marc Silver, Pages: 336, Published: 2005
Handbook of Human Factors in Web Design Authors: Robert W. Proctor, Kim-Phuong L. Vu, Pages: 738, Published: 2005
JavaScript Demystified: A Self-Teaching Guide Authors: James Edward Keogh, James Keogh, Pages: 375, Published: 2005
Camtasia Studio 3: The Definitive Guide Authors: Daniel Park, Daniel Richard Park, Pages: 562, Published: 2006
Oracle HTML DB Handbook Authors: Lawrence C. Linnemeyer, Bradley D. Brown, Pages: 486, Published: 2006
Microsoft Windows XP: Simply Visual Authors: Faithe Wempen, Pages: 443, Published: 2005
Beginning Xcode Authors: James Bucanek, Pages: 590, Published: 2006
Avid Xpress Pro Power! Authors: Steve Julin, Pages: 368, Published: 2004
Advances in Web-based Learning--ICWL 2003: Second International Conference, Melbourne, Australia, August 18-20, 2003, Proceedings Authors: Wanlei Zhou, Paul Nicholson, Brian Corbitt, Joseph Fong, Pages: 549, Published: 2003

Web:
Dynamic Drive CSS Library- Two level CSS Tabs menu May 7, 2006 ... Two level CSS Tabs menu. Author: Dynamic Drive. Building on a regular CSS Tabs Menu, this CSS menu supports second level content that can be ...
Dynamic Drive DHTML Scripts -DD Tab Menu (5 styles) Description: DD Tab Menu is a standards compliant, 2 level tab menu. Move your mouse over a tab, and a 2nd level content appears beneath it. ...
Cut & Paste 2 level horizontal tab menu Description: A CSS based tab menu that supports a secondary level of menu items. Both levels are horizontal, so there no drop down menus that may become ...
navigation Home; Products. Software; Hardware. Online shop; Extra. Icons; Desktops. Support ; Register; Company Info; Contact Info ...
Two Level XML Tab Menu Layout - FlashDen Apr 2, 2008 ... Two Level XML Tab Menu Web Layout..This template made in 100% XML Driven Features: * It can load any external SWF from XML ...
two level tab menu - ASP.NET Forums two level tab menu. Last post 08-06-2008 2:01 PM by icehanger. 65 replies. Sort Posts:. Oldest to newest, Newest to oldest ...
DD Tab Menu: Standards Compliant, Two Level Tab Menu: etc: quick ... May 10, 2007 ... Dynamic Drive DHTML Scripts -DD Tab Menu (5 styles) "is a standards compliant, 2 level tab menu. Move your mouse over a tab, and a 2nd level ...
Digg - Two level CSS Tab Menu with 5 unique styles DD Tab Menu is a standards compliant, 2 level tab menu that comes with 5 original tab menu interfaces for you to choose from.
I Would Like To Create Two Level Of Tabs Javascript. How I Can Do It? I would like to create two level of tabs javascript. How I can do it?
CSS Navigation Techniques (37 entries) CSS Navigation Showcase: Inverted Sliding Doors Tab // 456bereastreet.com ... CSS Navigation Showcase: Veerle's Two Level Menu ยท Veerle's Two Level Menu ...

Videos:
How can you run the gravemind level in Halo 2 in windows XP? How can you run the gravemind level in Halo 2 in windows XP? It's simple. 1.Play until the game write you must insert the cd or wrong CD key.(i don't...
Windows Mobile - Check Battery Level Performed on Windows Mobile 2003. Know how to check how much battery you have on Windows-powered cell phones. METHOD 1: Tap Start or press the Star...
Fable 2 Glitch Infinite EXP this glitch allows you to max out all your skills all you do is follow the video its a house in oakfield once you sleep inside you get a speed bonus ...
CAB Installation Tutorial-Windows Mobile/XDA-Devs-2 of 3 Heres the text that appears in the video: Hello, and welcome to a short tutorial on how to install .cab files to your Windows Mobile Phone! But, be...
Powerpoint Presentations: Bullets and Numbers Episode #3 (of 18-par series) from Nortel LearniT on the use of Powerpoint
Chrono Trigger LLG Part 45 - Mega Mutant Now the only sidequest left is the Black Omen, but we'll need some preparation before we tackle the Mega Mutant. You should enter the Black Omen in 1...
crysis on 8400M gs max setting this is me playing crysis on a advent 5401. this little video is just to prove that the 8400m gs is so under rated because it is actually a good gpu ...
Testing New Pen Cam A video showing some test shots of the pen cam I got. It functions as a color video/sound spy cam and a real pen that writes. The cam can be perfec...
iTouchDS review this is my review of the iTouchDS thank you dealwoot for contributing this flashcart for me ------------------------------ list of features written ...
Developing JavaScript with Chickenfoot Google TechTalks July 25, 2006 Rob Miller Michael Bolin ABSTRACT Chickenfoot is a Firefox extension that embeds a JavaScript programming environmen...




Search This Site:










visual studio express keyboard shortcuts no longer working

meesagebox in asp.net

email encryption

error when compiling

solpartmenu - excludetabs functionality

how to add legend on webform--urgent

datetime -- > problem in converting textbox value into datetime variable

the resource cannot be found

handeling video in asp.net

multiple aspnet_wp.exe processes running - which one to attach to??

credit card validation

having issues skinning, help please!

1.0.10 xxl minor spelling corrections

is this a more concise way of setting an event handler ?

content management.. (like: my.msn.com)

changing user passwords through a web part

dotnetnuke 3.0 for a large organisation

i really need help with " microsoft visual web developer 2005 express edition" with password recovery !

back button to go to the users previous page(urgent)

swapping local dnn database to server: how to

menuitemclick event not firing

round down whole numbers

open webdav web folder programatically from a web page

operations inside template columns?

how to install richtextbox 2.5 control in dnn 3.013?

how to make functionality like preview page on the first page of my.yahoo.com

bind system.drawing.color to dropdownlist

compiling a website in vs 2005

post publish batch file automation

namespaces and classes

 
All Times Are GMT