Tilretning af menu
Jeg har en menu, hvor der er et billede ud for de menupunkter, hvor der er underpunkter.Det billede vil jeg gerne have væk, men hvis jeg fjerner det, kan man ikke klikke på menupunktet.
Jeg er ikke så stærk i CSS, så jeg tænkte at der var en venlig sjæl her, der ville hjælpe mig. :)
Her er mit stylesheet:
.mnbutblank{
margin-right: 6px;
}
.mndivhdr {
margin-top: 6px;
margin-bottom: 4px;
margin-left: -26px;
font-size: 12px;
color: #003366;
font-family: Verdana;
font-weight: bold;
cursor: pointer;
}
.sublinks {
margin-top: 0px;
margin-bottom: 0px;
margin-left: 55px;
font-size: 9px;
font-family: Verdana;
color: #003366;
width: 145px;
}
.sublinks a:link {
text-decoration: none;
color: #003366;
}
.sublinks a:visited {
text-decoration: none;
color: #003366;
}
.sublinks a:hover {
text-decoration: none;
color: #003366;
}
.sublinksimg {
margin-top: 0px;
margin-bottom: 0px;
margin-left: 44px;
font-size: 9px;
font-family: Verdana;
color: #003366;
width: 145px;
}
.sublinksimg a:link {
text-decoration: none;
color: #003366;
}
.sublinksimg a:visited {
text-decoration: none;
color: #003366;
}
.sublinksimg a:hover {
text-decoration: none;
color: #003366;
}
.showit {display: block;}
.hideit {display: none;}
.lineit {display: inline;}
img {border: 0px;}
.nn4imgbord {color: white;}
body { background-color: #FFFFFF;}
.links {
margin-top: 0px;
margin-bottom: 0px;
margin-left: 75px;
font-weight: bold;
font-size: 12px;
font-family: Verdana;
color: #003366;
width: 142px;
}
.links a:link {
text-decoration: none;
color: #003366;
}
.links a:visited {
text-decoration: none;
color: #003366;
}
.links a:hover {
text-decoration: none;
color: #003366;
}
.linksimg {
margin-top: 0px;
margin-bottom: 0px;
margin-left: 64px;
font-weight: bold;
font-size: 12px;
font-family: Verdana;
color: #003366;
width: 142px;
}
.linksimg a:link {
text-decoration: none;
color: #003366;
}
.linksimg a:visited {
text-decoration: none;
color: #003366;
}
.linksimg a:hover {
text-decoration: none;
color: #003366;
}
.toplinks {
margin-top: 0px;
margin-bottom: 0px;
margin-left: 49px;
font-weight: bold;
font-size: 12px;
font-family: Verdana;
color: #013D78;
width: 132px;
}
.toplinks a:link {
text-decoration: none;
color: #003366;
}
.toplinks a:visited {
text-decoration: none;
color: #003366;
}
.toplinks a:hover {
text-decoration: none;
color: #003366;
}
----------------------------------
Her er min kode(asp):
<body onLoad="skiftKlasse(0,'none','showit','hideit','div');skiftKlasse(0,'none','mnbutblank','mnplus','img');skiftKlasse(0,'none','expblank','expandit','img');skiftKlasse(0,'none','expblank2','expandit2','img'); showHideLayers('HideOnloadDiv','','hide');">
<div id="HideOnloadDiv" style="position:absolute; left:0px; top:0px; width:100%; height:100%; background-color:#ffffff; visibility:visible; z-index:2"></div>
<div id="Layer1" style="position:absolute; left:25px; top:25px; width:160px; z-index:1">
<p class="oclinks">
<a href="java script:;" onClick="skiftKlasse(0,'none','hideit','showit','div');skiftKlasse(0,'none','mnplus','mnminus','img')">
<br>
<strong>Åben</strong></a> | <a href="java script:;" onClick="skiftKlasse(0,'none','showit','hideit','div');skiftKlasse(0,'none','mnminus','mnplus','img')">
<strong>Luk</strong></a>
</p>
<br>
<br>
<!-- #include file="databaseconn.asp" -->
<%
tal = 1
under = 0
SQL = "SELECT * FROM menu"
Set rs = Conn.Execute(SQL)
do while not rs.eof
response.Write "<p class=""mndivhdr"" onClick=""skiftKlasse(1,'mn" & tal & "','showit','hideit','div');skiftKlasse(1,'but" & tal & "','mnminus','mnplus','img')"">" & vbCrLf
SQL = "SELECT * FROM undermenu where menuid='" & rs("id") & "'"
Set res = Conn.Execute(SQL)
under = 0
if not res.eof then
under = 1
response.Write "<IMG class=billede alt='Åben undermenu' src='grafik/pil.gif'><div class=toplinks> " & rs("navn") & "</div>" & vbCrLf
else
insert_link "links",rs("link"), rs("navn")
end if
if not res.eof then
under = 1
response.Write "<div id=""mn" & tal & """ class=""hideit"">" & vbCrLf
do while not res.eof
insert_link "sublinks",res("link"), res("navn")
res.movenext
loop
end if
if under = 1 then
response.Write "</div>" & vbCrLf
end if
rs.movenext
tal = tal + 1
loop
%>
</div>
