i'm developing a web site in asp.net 3.5 w/ c# 2008 for a local non-profit. i'm fairly new to asp.net and css, and since i don't have much of an eye for graphic design, i'm using the Multiflex-3 template from 1234.info as a base/starting point.
the problem is that this template uses a <ul> to define items in its menu structure, but i want to use asp.net's built-in menu control to pull pages from an .xml file.
here is the existing menu structure:
<!-- Navigation Level 2 (Drop-down menus) --> <div class="nav2"> <!-- Navigation item --> <ul> <li><a href="index.html">Overview</a></li> </ul> <!-- Navigation item --> <ul> <li><a href="#">Page Layouts<!--[if IE 7]><!--></a><!--<![endif]--> <!--[if lte IE 6]><table><tr><td><![endif]--> <ul> <li><a href="layout1.html">Layout-1 (1-col)</a></li> <li><a href="layout2.html">Layout-2 (2-col)</a></li> <li><a href="layout3.html">Layout-3 (2-col)</a></li> <li><a href="layout4.html">Layout-4 (3-col)</a></li> <li><a href="layout5.html">Layout-5 (3-col)</a></li> </ul> <!--[if lte IE 6]></td></tr></table></a><![endif]--> </li> </ul> <!-- Navigation item --> <ul> <li><a href="#">Header Layouts<!--[if IE 7]><!--></a><!--<![endif]--> <!--[if lte IE 6]><table><tr><td><![endif]--> <ul> <li><a href="header1.html">Header-1 (T+M+B)</a></li> <li><a href="header2.html">Header-2 (T+M)</a></li> <li><a href="header3.html">Header-3 (T+B)</a></li> <li><a href="header4.html">Header-4 (M+B)</a></li> <li><a href="header5.html">Header-5 (T)</a></li> <li><a href="header6.html">Header-6 (M)</a></li> <li><a href="header7.html">Header-7 (B)</a></li> </ul> <!--[if lte IE 6]></td></tr></table></a><![endif]--> </li> </ul> </div>
here is the css behind it:
/*Drop-down menu*/
.nav2 {float:left; width:900px; border:none; background:rgb(220,220,220) url(../img/bg_head_bottom_nav.jpg) no-repeat; color:rgb(75,75,75); font-size:130%;} /*Color navigation bar normal mode*/
.nav2 ul {list-style-type:none;}
.nav2 ul li {float:left; position:relative; z-index:auto !important /*Non-IE6*/; z-index:1000 /*IE6*/; border-right:solid 1px rgb(175,175,175);}
.nav2 ul li a {float:none !important /*Non-IE6*/; float:left /*IE-6*/; display:block; height:3.1em; line-height:3.1em; padding:0 16px 0 16px; text-decoration:none; font-weight:bold; color: rgb(100,100,100);}
.nav2 ul li ul {display:none; border:none;}
/*Non-IE6 hovering*/
.nav2 ul li:hover a {background-color:rgb(210,210,210); text-decoration:none;} /*Color main cells hovering mode*/
.nav2 ul li:hover ul {display:block; width:10.0em; position:absolute; z-index:999; top:3.0em; margin-top:0.1em; left:0;}
.nav2 ul li:hover ul li a {display:block; width:10.0em; height:auto; line-height:1.3em; margin-left:-1px; padding:4px 16px 4px 16px; border-left:solid 1px rgb(175,175,175); border-bottom: solid 1px rgb(175,175,175); background-color:rgb(237,237,237); font-weight:normal; color:rgb(50,50,50);} /*Color subcells normal mode*/
.nav2 ul li:hover ul li a:hover {background-color:rgb(210,210,210); text-decoration:none;} /*Color subcells hovering mode*/
/*IE6 hovering*/
.nav2 table {position:absolute; top:0; left:0; border-collapse:collapse;}
.nav2 ul li a:hover {background-color:rgb(210,210,210); text-decoration:none;} /*Color main cells hovering mode*/
.nav2 ul li a:hover ul {display:block; width:10.0em; position:absolute; z-index:999; top:3.1em; t\op:3.0em; left:0; marg\in-top:0.1em;}
.nav2 ul li a:hover ul li a {display:block; w\idth:10.0em; height:1px; line-height:1.3em; padding:4px 16px 4px 16px; border-left:solid 1px rgb(175,175,175); border-bottom: solid 1px rgb(175,175,175); background-color:rgb(237,237,237); font-weight:normal; color:rgb(50,50,50);} /*Color subcells normal mode*/
.nav2 ul li a:hover ul li a:hover {background-color:rgb(210,210,210); text-decoration:none;} /*Color subcells hovering mode*/
@media print {.nav2 {float:left; width:900px; border:none; background:rgb(240,240,240); color:rgb(75,75,75); font-size:1.0em; font-size:130%;}} /*Color navigation bar normal mode*/
i believe the way to do this is within the <asp:Menu...></asp:Menu> using either Level Styles or Static & Dynamic Styles, but i'm not exactly sure what the best way to do this would be.
so far, i have this:
(note, i have inserted dashes in place of spaces in the css file so i can point these styles directly to them)
<LevelMenuItemStyles> <asp:MenuItemStyle CssClass="nav2-ul-li" /> <asp:MenuItemStyle CssClass="nav2-ul-li" /> </LevelMenuItemStyles> <StaticHoverStyle CssClass="nav2-ul-li-hover-a" /> <DynamicHoverStyle CssClass="nav2-ul-li-hover-ul-li-a-hover" /> <LevelSubMenuStyles> <asp:SubMenuStyle CssClass="nav2-ul-li-a" /> </LevelSubMenuStyles> <LevelSelectedStyles> <asp:MenuItemStyle CssClass="nav2-ul-li-hover-a" /> </LevelSelectedStyles>
if you could offer assistance in helping me get my menu to look like the one in the Multiflex-3 template, it would be greatly appreciated!
thank you for taking the time to look at my problem!

New Topic/Question
Reply




MultiQuote





|