23. september 2003 - 22:20
Der er
8 kommentarer og 1 løsning
Sætte et link til active fra start.
Jeg har f.eks. 4 tekstknapper i en menu: 1.Startside 2.Download 3.Juletræ 4.noget andet Når man trykker på knapperne bruger jeg CSS-stylen: .menu:active Men hvordan kan jeg sætter jeg knappen: 1.Startside til at være .menu:active fra starten af - så brugeren kan se at han i forvejen er på startsiden når han går ind på hjemmesiden? M.v.h. SKARVEN
Annonceindlæg fra QNAP
23. september 2003 - 23:14
#1
Nogen på linien? :-)
24. september 2003 - 09:47
#2
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>404866</title> <script language="JavaScript" type="text/javascript"> document.getElementById('1.Startside').className = '.menu:active'; </script> </head> <body> <input id="1.Startside" name="1.Startside" type="button"> </body> </html>
24. september 2003 - 09:48
#3
glemte lige en onLoad: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>404866</title> <script language="JavaScript" type="text/javascript"> function startSide(){ document.getElementById('1.Startside').className = '.menu:active'; } </script> </head> <body onLoad="startSide();"> <input id="1.Startside" name="1.Startside" type="button"> </body> </html>
24. september 2003 - 11:34
#4
Jeg er ikke så hård til det men jeg paster lige siden ind som er en topframe i et frameset: Det er selve teksten INTRODUKTION jeg gerne vil ha sat til stylen: .menutxt:active fra start. _____________________________________________________________________________ <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link rel="stylesheet" href="site.css" type="text/css"> </head> <body text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" bgcolor="#FFFFFF"> <table width="787" border="0" cellspacing="0" cellpadding="0" height="100%" align="center"> <tr> <td valign="bottom" colspan="2"> <div align="center" class="menutxt"></div> </td> </tr> <tr> <td valign="bottom" height="79" width="17"> </td> <td valign="bottom" background="menubackground.jpg" height="79" width="770"><a href="details.html" target="Main" class="menutxt"> </a><a href="java script:window.top.close()" class="menutxt"> </a> <table width="100%" border="0" cellspacing="0" cellpadding="0" height="15"> <tr> <td width="15" class="menurep"><img src="menublock.gif" width="6" height="15"><img src="menustart.gif" width="7" height="15"></td> <td width="100" height="5" class="menurep"> <div align="center"><a href="main.html" target="Main" class="menutxt">INTRODUKTION</a></div> </td> <td width="23" class="menurep"><img src="menuend.gif" width="7" height="15"><img src="menublock.gif" width="6" height="15"><img src="menustart.gif" width="7" height="15"></td> <td width="80" class="menurep"> <div align="center"><a href="details.html" target="Main" class="menutxt">DETALJER</a></div> </td> <td width="20" class="menurep"><img src="menuend.gif" width="7" height="15"><img src="menublock.gif" width="6" height="15"><img src="menustart.gif" width="7" height="15"></td> <td class="menurep" width="70" valign="middle"> <div align="center"><a href="videoselect.html" class="menutxt" target="Main">VIDEO</a></div> </td> <td width="20" class="menurep"><img src="menuend.gif" width="7" height="15"><img src="menublock.gif" width="6" height="15"><img src="menustart.gif" width="7" height="15"></td> <td width="70" class="menurep" valign="middle"> <div align="center" class="menutxt"><a href="map.html" class="menutxt" target="Main">KONTAKT</a></div> </td> <td><img src="menuend.gif" width="7" height="15"><img src="menublock.gif" width="6" height="15"><img src="menustart.gif" width="7" height="15"></td> <td width="70" class="menurep"> <div align="center"><a href="java script:window.top.close()" class="menutxt">AFSLUT</a> </div> </td> <td width="15"><img src="menuend.gif" width="7" height="15"><img src="menublock.gif" width="6" height="15"></td> <td width="267"> </td> </tr> </table> </td> </tr> </table> </body> </html>
24. september 2003 - 11:37
#5
Mit stylesheet: ____________________________________________ .menutxt { font-size: 10px; font-weight: bold; color: #000000; text-decoration: none; font-family: Verdana, Arial, Helvetica, sans-serif; vertical-align: middle} .menutxt:hover { color: #ffffff; text-decoration: none; vertical-align: middle} .menutxt:active { color: #003399; text-decoration: none; vertical-align: middle}
24. september 2003 - 11:42
#6
Har lige smidt lidt flere point på.. :-)
24. september 2003 - 12:49
#7
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>404866</title> <script language="JavaScript" type="text/javascript"> function startSide(){ document.getElementById('intro').className = 'start'; } </script> <style type="text/css"> .menutxt { font-size: 10px; font-weight: bold; color: #000000; text-decoration: none; font-family: Verdana, Arial, Helvetica, sans-serif; vertical-align: middle} .menutxt:hover { color: #ffffff; text-decoration: none; vertical-align: middle} .menutxt:active { color: #003399; text-decoration: none; vertical-align: middle} .start { color: #003399; text-decoration: none; vertical-align: middle} </style> </head> <body text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" bgcolor="#FFFFFF" onLoad="startSide();"> <table width="787" border="0" cellspacing="0" cellpadding="0" height="100%" align="center"> <tr> <td valign="bottom" colspan="2"> <div align="center" class="menutxt"></div> </td> </tr> <tr> <td valign="bottom" height="79" width="17"> </td> <td valign="bottom" background="menubackground.jpg" height="79" width="770"><a href="details.html" target="Main" class="menutxt"> </a><a href="java script:window.top.close(" class="menutxt"> </a> <table width="100%" border="0" cellspacing="0" cellpadding="0" height="15"> <tr> <td width="15" class="menurep"><img src="menublock.gif" width="6" height="15"><img src="menustart.gif" width="7" height="15"></td> <td width="100" height="5" class="menurep"> <div align="center"><a href="main.html" id="intro" target="Main" class="menutxt">INTRODUKTION</a></div> </td> <td width="23" class="menurep"><img src="menuend.gif" width="7" height="15"><img src="menublock.gif" width="6" height="15"><img src="menustart.gif" width="7" height="15"></td> <td width="80" class="menurep"> <div align="center"><a href="details.html" target="Main" class="menutxt">DETALJER</a></div> </td> <td width="20" class="menurep"><img src="menuend.gif" width="7" height="15"><img src="menublock.gif" width="6" height="15"><img src="menustart.gif" width="7" height="15"></td> <td class="menurep" width="70" valign="middle"> <div align="center"><a href="videoselect.html" class="menutxt" target="Main">VIDEO</a></div> </td> <td width="20" class="menurep"><img src="menuend.gif" width="7" height="15"><img src="menublock.gif" width="6" height="15"><img src="menustart.gif" width="7" height="15"></td> <td width="70" class="menurep" valign="middle"> <div align="center" class="menutxt"><a href="map.html" class="menutxt" target="Main">KONTAKT</a></div> </td> <td><img src="menuend.gif" width="7" height="15"><img src="menublock.gif" width="6" height="15"><img src="menustart.gif" width="7" height="15"></td> <td width="70" class="menurep"> <div align="center"><a href="java script:window.top.close(" class="menutxt">AFSLUT</a> </div> </td> <td width="15"><img src="menuend.gif" width="7" height="15"><img src="menublock.gif" width="6" height="15"></td> <td width="267"> </td> </tr> </table> </td> </tr> </table> </body> </html>
24. september 2003 - 23:01
#8
Takker mange gange.... endelig så jeg lyset... :-)
25. september 2003 - 10:14
#9
selv tak :o)
Vi tilbyder markedets bedste kurser inden for webudvikling