Jag har gjort en Switch Menu, men vet inte hur jag ska få samma "länk effekt" på "rubrikerna" när jag för musen över länken :r
Koden jag använder till css'n kommer efter meny koden!
<html>
<head>
<link rel="stylesheet" href="skimmer.css">
<style type="text/css">
.menutitle{
cursor:w-resize;
color:#000000;
text-align:left;
font-weight:normal;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: xx-small;
}
.submenu{
margin-bottom: 0.5em;
margin-left: 10px;
}
</style>
<script type="text/javascript">
/***********************************************
* Switch Menu script- by Martial B of [url]http://getElementById.com/[/url]
* Modified by Dynamic Drive for format & NS4/IE4 compatibility
* Visit [url]http://www.dynamicdrive.com/[/url] for full source code
***********************************************/
if (document.getElementById){ //DynamicDrive.com change
document.write('<style type="text/css">\n')
document.write('.submenu{display: none;}\n')
document.write('</style>\n')
}
function SwitchMenu(obj){
if(document.getElementById){
var el = document.getElementById(obj);
var ar = document.getElementById("masterdiv").getElementsByTagName("span"); //DynamicDrive.com change
if(el.style.display != "block"){ //DynamicDrive.com change
for (var i=0; i<ar.length; i++){
if (ar[i].className=="submenu") //DynamicDrive.com change
ar[i].style.display = "none";
}
el.style.display = "block";
}else{
el.style.display = "none";
}
}
}
</script>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Switch_meny</title>
<base target="main">
</head>
<body>
<!-- Keep all menus within masterdiv-->
<div id="masterdiv">
<div class="menutitle" onclick="SwitchMenu('sub1')">Ego</div>
<span class="submenu" id="sub1">
- <a href="ego.htm">Om mig</a><br>
- <a href="minfamilj.htm">Min familj</a><br>
- <a href="abc.htm">Mitt abc</a><br>
</span>
<a href="blog/blog.htm">Blog</a><br>
<a href="affiliates.htm">Affiliates</a><br>
<a href="fanlistings.htm">Fanlistings</a><br>
<div class="menutitle" onclick="SwitchMenu('sub2')">Om sidan</div>
<span class="submenu" id="sub2">
- <a href="omsidan.htm">Fakta</a><br>
- <a href="credits.htm">Credits</a><br>
- <a href="layouter.htm">Tidigare layouter</a>
</span>
<div class="menutitle" onclick="SwitchMenu('sub3')">Kontakt</div>
<span class="submenu" id="sub3">
- <a href="kontakt.htm">Maila</a><br>
- <a href="http://www.contact.kaveh.net/guestbook.asp?id=8176">Gästbok</a>
</span>
<a href="main.htm">Hem</a>
</div>
</body>
</html>
[kod]
body, a {
text-decoration:none;
color: #000000;
font-family: verdana;
font-weight: normal;
font-size: xx-small;
/* text-align:center;*/
line-height:200%;
background-color: transparent;
}
<!--
A:link{COLOR: #000000; TEXT-DECORATION: none; cursor: w-resize}
A:visited{COLOR: #000000; TEXT-DECORATION: none;}
A:active{COLOR: #000000; TEXT-DECORATION: none;}
A:hover{COLOR: 000000; letter-spacing:2px;background-color: #F6E3A1;TEXT-DECORATION: underline overline; cursor: w-resize}
-->
body {
scrollbar-face-color: #FF40FF;
scrollbar-highlight-color: #FF40FF;
scrollbar-3dlight-color: #ffffff;
scrollbar-darkshadow-color: #FF40FF;
scrollbar-shadow-color:#000000;
scrollbar-arrow-color: #000000;
scrollbar-track-color: #FF40FF;
}
-->
{ }
/*<!--
BODY {background-color: #FCEBBD; filter: alpha(opacity=80) }
-->*/
</STYLE>