04-09-2008, 09:01 PM
|
#1 (permalink)
|
|
Junior Member
Join Date: Apr 2008
Posts: 1
|
NEED HELP ASAP dropdown-menu asp.net + css
im working on a site that is asp.net and it has a drop down menu that is server side included into the header. i can not get the dropdown of the one link (collection) lined up with the rest of the buttons which are describe with css. here is the code
thanks.
Adamant Designs
header.asp
Code:
<div class="menu">
<div align="center">
<ul>
<!--#include file="menuResources/nav_sql_hz_drop.asp"-->
<li><a href="/listCategoriesAndProducts.asp?idCategory=107">ENGAGEMENT</a></li>
<li><a href="/rapaport_searchform.asp">LOOSE DIAMONDS</a></li>
<li><a href="/listhotdealsproducts.asp">SPECIALS</a></li>
<li><a href="/listCategoriesAndProducts.asp?idCategory=90">GIFTS</a></li>
<li><a href="/cms/customdesign.asp">CUSTOM DESIGN</a></li>
<li><a href="/customerwishlistview.asp">WISH LIST</a></li>
<li><a href="/customerutilitiesmenu.asp">MY ACCOUNT</a></li>
<li><a href="url">SHOPPING BAG</a></li>
<li><a href="/advancedsearchform.asp">SEARCH</a></li>
</ul>
</div>
</div>
<div class="frame br">
<table width="975" border="0" cellpadding="0" cellspacing="5" bgcolor="#FFFFFF">
<tr>
<td align="left" valign="top">
nav_sql_hz_drop.asp
Code:
<%
dim xidCategory, xcategoryDesc, isCategories
mySQL = "SELECT c1.idCategory AS idCategory1, isnull(c1.categoryDesc, '') AS categoryDesc1, isnull(c2.idCategory, 0) AS idCategory2, isnull(c2.categoryDesc, '') AS categoryDesc2, isnull(c3.idCategory, 0) AS idCategory3, isnull(c3.categoryDesc, '') AS categoryDesc3, isnull(c4.idCategory, 0) AS idCategory4, isnull(c4.categoryDesc, '') AS categoryDesc4, isnull(c5.idCategory, 0) AS idCategory5, isnull(c5.categoryDesc, '') AS categoryDesc5 FROM categories c1 left outer join categories c2 on (c1.idCategory = c2.idParentCategory and c2.active=-1) left outer join categories c3 on (c2.idCategory = c3.idParentCategory and c3.active=-1) left outer join categories c4 on (c3.idCategory = c4.idParentCategory and c4.active=-1) left outer join categories c5 on (c4.idCategory = c5.idParentCategory and c5.active=-1) WHERE (c1.idCategory <> 1) AND (c1.idParentCategory = 1) AND (c1.active = -1) ORDER BY c1.displayOrder, c1.idCategory, c2.displayOrder, c2.idCategory, c3.displayOrder, c3.idCategory, c4.displayOrder, c4.idCategory, c5.displayOrder"
call openDb()
call getFromDatabase (mySQL, rsTemp_Menu, "rsTemp_Menu")
isCategories = (not rsTemp_Menu.Eof)
If isCategories then
%><ul id="navmenu"><%
%><li><a href="/listcategoriesandproducts.asp">COLLECTION</a></li><%
End if
call getChildCategories(1, 0)
If isCategories then
%></li><%
%></ul><%
End if
rsTemp_Menu.Close
function getChildCategories(xidParentCategory, xLevel)
dim isCategories, xidCategory, xcategoryDesc
if xLevel=5 then
isCategories = false
else
isCategories = (rsTemp_Menu("idCategory"&cStr(xLevel+1))>0)
end if
If isCategories then
%><ul><%
End if
xidCategory = 0
do while isCategories and (not rsTemp_Menu.Eof)
xidCategory = rsTemp_Menu("idCategory"&cStr(xLevel+1))
xcategoryDesc = rtrim(ltrim(rsTemp_Menu("categoryDesc"&cStr(xLevel+1))))
if xLevel>0 Then
if xidParentCategory<>rsTemp_Menu("idCategory"&cStr(xLevel)) then
exit do
end if
end if
%><li><a class="" href="/listCategoriesAndProducts.asp?idCategory=<%=xidCategory%>"><%=xcategoryDesc%></a><%
if xLevel<5 then
call getChildCategories(xidCategory, xLevel+1)
end if
%></li><%
loop
If isCategories then
%></ul><%
End if
if not isCategories then
rsTemp_Menu.MoveNext
end if
end function
%>
lib/nav2.css
Code:
/* Root = Vertical, Secondary = Vertical */
ul#navmenu,
ul#navmenu li,
ul#navmenu ul {
margin: 0;
border: 0 none;
padding: 0;
width: 75px; /*For KHTML*/
list-style-type: none;
list-style: none;
z-index: 1;
display:inline;
}
ul#navmenu:after /*From IE 7 lack of compliance*/{
clear: both;
display: block;
font: 1px/0px serif;
content: ".";
height: 0;
visibility: hidden;
}
ul#navmenu li {
float: left; /*For IE 7 lack of compliance*/
display: block !important; /*For GOOD browsers*/
position: relative;
}
/* Root Menu */
ul#navmenu a {
border-right-color: #999999;
border-bottom-color: #999999;
padding: 0 6px;
display: block;
text-decoration: none;
height: auto !important;
height: 1%;
border-top-width: 0px;
border-right-width: 0px;
border-bottom-width: 0px;
border-left-width: 0px;
border-top-style: solid;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
border-top-color: #CCCCCC;
border-left-color: #CCCCCC;
background-image: url(/images/nav-rollovers.jpg);
background-repeat: no-repeat;
background-position: 0px 0px;
line-height: 18px;
margin-bottom:7px;
font-size:11px;
font-family: 80% verdana, arial, sans-serif;
color:#f5f5dc;
font-stretch: expanded;
}
/* Root Menu Hover Persistence */
ul#navmenu a:hover,
ul#navmenu li:hover a,
ul#navmenu li.iehover a {
color: #FFF;
background-repeat: no-repeat;
background-position: 0px -82px;
}
/* 2nd Menu */
ul#navmenu li:hover li a,
ul#navmenu li.iehover li a {
margin-bottom:0px;
color: #000000;
background-color: #EDE6CA;
background-position: 0px 0px;
width: 100px; /*For KHTML*/
}
/* 2nd Menu Hover Persistence */
ul#navmenu li:hover li a:hover,
ul#navmenu li:hover li:hover a,
ul#navmenu li.iehover li a:hover,
ul#navmenu li.iehover li.iehover a {
color: #FFF;
background-color: #4D4D4D;
background-position: 0px -82px;
}
/* 3rd Menu */
ul#navmenu li:hover li:hover li a,
ul#navmenu li.iehover li.iehover li a {
color: #000000;
background-color: #EDE6CA;
background-position: 0px 0px;
}
/* 3rd Menu Hover Persistence */
ul#navmenu li:hover li:hover li a:hover,
ul#navmenu li:hover li:hover li:hover a,
ul#navmenu li.iehover li.iehover li a:hover,
ul#navmenu li.iehover li.iehover li.iehover a {
color: #FFF;
background-color: #4D4D4D;
}
/* 4th Menu */
ul#navmenu li:hover li:hover li:hover li a,
ul#navmenu li.iehover li.iehover li.iehover li a {
color: #000000;
background-color: #EDE6CA;
background-position: 0px 0px;
}
/* 4th Menu Hover */
ul#navmenu li:hover li:hover li:hover li a:hover,
ul#navmenu li.iehover li.iehover li.iehover li a:hover {
color: #FFF;
background-color: #4D4D4D;
}
/* 5th Menu */
ul#navmenu li:hover li:hover li:hover li:hover li a,
ul#navmenu li.iehover li.iehover li.iehover li.iehover li a {
color: #000000;
background-color: #CCCCCC;
background-position: 0px 0px;
}
/* 5th Menu Hover */
ul#navmenu li:hover li:hover li:hover li:hover li a:hover,
ul#navmenu li.iehover li.iehover li.iehover li.iehover li a:hover {
color: #FFF;
background-color: #4D4D4D;
}
/* 1st Level Left Margin */
ul#navmenu ul {
display: none;
position: absolute;
top: 0;
left: 125px;
margin-left: -125px;
margin-top: 25px;
}
/* Do Not Move - Must Come Before display:block for Gecko */
ul#navmenu li:hover ul ul,
ul#navmenu li:hover ul ul ul,
ul#navmenu li:hover ul ul ul ul,
ul#navmenu li:hover ul ul ul ul ul,
ul#navmenu li:hover ul ul ul ul ul ul,
ul#navmenu li.iehover ul ul,
ul#navmenu li.iehover ul ul ul,
ul#navmenu li.iehover ul ul ul ul,
ul#navmenu li.iehover ul ul ul ul ul,
ul#navmenu li.iehover ul ul ul ul ul ul {
display: none;
}
ul#navmenu li:hover ul,
ul#navmenu ul li:hover ul,
ul#navmenu ul ul li:hover ul,
ul#navmenu ul ul ul li:hover ul,
ul#navmenu ul ul ul ul li:hover ul,
ul#navmenu ul ul ul ul ul ul li:hover ul,
ul#navmenu ul ul ul ul ul ul ul li:hover ul,
ul#navmenu li.iehover ul,
ul#navmenu ul li.iehover ul,
ul#navmenu ul ul li.iehover ul,
ul#navmenu ul ul ul li.iehover ul,
ul#navmenu ul ul ul ul ul li.iehover ul,
ul#navmenu ul ul ul ul li.iehover ul {
display: block;
}
ul#navmenu ul li:hover ul,
ul#navmenu ul ul li:hover ul,
ul#navmenu ul ul ul li:hover ul,
ul#navmenu ul ul ul ul li:hover ul,
ul#navmenu ul ul ul ul ul ul li:hover ul,
ul#navmenu ul ul ul ul ul ul ul li:hover ul,
ul#navmenu ul li.iehover ul,
ul#navmenu ul ul li.iehover ul,
ul#navmenu ul ul ul li.iehover ul,
ul#navmenu ul ul ul ul ul li.iehover ul,
ul#navmenu ul ul ul ul li.iehover ul {
margin-left: -13px;
margin-top: 0px;
}
[Edited on 9-4-2008 by brandonl]
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
Points Per Thread View: 1.00
Points Per Thread: 11.00
Points Per Reply: 5.00
|
|
|
|
|