+ Antworten
Ergebnis 1 bis 5 von 5

Thema: Link-Farbe ändern

  1. #1
    Guest Kerim macht alles soweit korrekt
    Registriert seit
    Jun 2002
    Beiträge
    195

    Link-Farbe ändern

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <script type="text/javascript" language="JavaScript">

    <!-- This script and many more are available free online at -->
    <!-- The JavaScript Source!! http://javascript.internet.com -->
    <!-- Original: ScriptBreaker (admin@scriptbreaker.com) -->
    <!-- Web Site: http://www.ScriptBreaker.com -->
    <!-- Begin
    function locktrueie(myform){myform.ie.checked=true;}
    function lockfalsenet(myform){myform.nets.checked=true;}
    function goToURL() { window.location = "http://www.javascriptsource.com"; }

    function nochange(mycheckbox)
    {
    if (mycheckbox.checked == true){mycheckbox.checked = false;}else{mycheckbox.checked = true;}
    }

    // End -->
    </script>
    <style type="text/css">
    . tds
    {
    background-Color:silver;
    width:200;
    height:20;
    text-align:center;
    border:1px solid gray;
    font-size:14;
    font-color:#999999;
    filter:alpha(opacity=45);
    -moz-opacity:45%;
    cursor:crosshair;
    }

    </style>
    <script type="text/javascript" language="javascript">
    nOpac = 50
    nPlus = 2
    nMin = 1
    speed = 30
    timer = null;
    timer2 = null;

    var ie5=(document.all && document.getElementById);
    var ns6=(!document.all && document.getElementById);

    function fadeImg2(teller)
    {
    apl[teller][1] = "Up";
    changes();
    }

    function fadeImgend2(teller)
    {
    apl[teller][1] = "Down";
    setTimeout("changes()",50);
    }

    function changes()
    {
    next_loop = true;
    for (i=0;i<apl.length;i++)
    {
    obj = link_table.rows[0].cells[i];

    opacity = apl[i][0]
    if (apl[i][1] == "Up")
    {
    opacity += nPlus;
    apl[i][0] = opacity;
    if (apl[i][0] > 105)
    {apl[i][1] = "";}
    else
    {next_loop = false;}
    nOpac = opacity;
    }
    else
    {
    if (apl[i][1] == "Down")
    {
    opacity -= nMin;
    apl[i][0] = opacity;
    if (apl[i][0] < 45)
    {apl[i][1] = "";}
    else
    {next_loop = false;}
    nOpac = opacity;
    }
    }
    if(ie5){
    obj.style.filter="alpha(opacity="+opacity+")";
    }
    if(ns6){
    obj.style.MozOpacity = opacity + '%';
    }
    }
    if (next_loop == false)
    {
    timer = setTimeout("changes()",speed);
    }
    else
    {
    clearTimeout(timer);
    }
    }

    //for each link option you need to make a new Array;
    var apl = new Array();
    apl[0] = new Array(45,"");
    apl[1] = new Array(45,"");
    apl[2] = new Array(45,"");
    apl[3] = new Array(45,"");
    apl[4] = new Array(45,"");
    apl[5] = new Array(45,"");
    //expl: apl[6] = new Array(45,"");
    </script>
    </head>
    <body text="#999999">
    <table style="border:1px groove blue; width:789;height:40" cellspacing="0" cellpadding="0" font color="#999999">
    <tr>
    <td align="center" bgcolor="silver"><img src="bilder/menu.jpg" width="786" height="20" border="0"></td>
    </tr>
    <tr>
    <td align="center" border="2">
    <table cellpadding="0" cellspacing="0" name=
    "link_table" id="link_table">
    <tr>
    <td class="tds" onmouseover="fadeImg2(0)"
    onmouseout="fadeImgend2(0)" style=
    "border:1px solid gray;background-color:silver;width:200;text-align:center">
    <a href="#" onClick="parent.frames[1].location='kerim.html'; parent.frames[2].location='mich.html'; return false;"><b>Über mich</b></a>
    </td>
    <td class="tds" onmouseover="fadeImg2(1)"
    onmouseout="fadeImgend2(1)" style=
    "border:1px solid gray;background-color:silver;width:200;text-align:center">
    <a href="#" onClick="parent.frames[2].location='kerim.html'; parent.frames[1].location='bilder.html'; return false;"><b>Fotos</b></a>
    </td>
    <td class="tds" onmouseover="fadeImg2(2)"
    onmouseout="fadeImgend2(2)" style=
    "border:1px solid gray;background-color:silver;width:200;text-align:center">
    <a href="#" onClick="parent.frames[2].location='kerim.html'; parent.frames[1].location='tuerkei.html'; return false;"><b>Türkei</b></a>
    </td>
    <td class="tds" onmouseover="fadeImg2(3)"
    onmouseout="fadeImgend2(3)" style=
    "border:1px solid gray;background-color:silver;width:200;text-align:center">
    <a href="#" onClick="parent.frames[2].location='kerim.html'; parent.frames[1].location='islam.html'; return false;"><b>Islam</b></a>
    </td>
    <td class="tds" onmouseover="fadeImg2(4)"
    onmouseout="fadeImgend2(4)" style=
    "border:1px solid gray;background-color:silver;width:200;text-align:center">
    <a href="#" onClick="parent.frames[2].location='kerim.html'; parent.frames[1].location='links.html'; return false;"><b>Verschiedenes</b></a>
    </td>
    <td class="tds" onmouseover="fadeImg2(5)"
    onmouseout="fadeImgend2(5)" style=
    "border:1px solid gray;background-color:silver;width:200;text-align:center">
    <a href="#" onClick="parent.frames[2].location='kerim.html'; parent.frames[1].location='kontakt.html'; return false;"><b>Kontakt</b></a>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </body>
    </html>

    Bei mir erscheint da im Menu die Links in einem Lila, ich hätte aber gerne die Farbe "#999999" ... hab schon versucht mit a:linke etc. pp. oder auch mit Font-Tags etc.pp. aber dieses Lila krieg ich einfach nicht weg

  2. #2
    TP-Member taratus macht alles soweit korrekt Avatar von taratus
    Registriert seit
    Sep 2002
    Ort
    Berlin
    Beiträge
    46
    Also ich habe das ganze geteste, aber einen lilafarbener Link konnte ich nicht feststellen. Bei mir waren die alle grün.

  3. #3
    Guest Kerim macht alles soweit korrekt
    Registriert seit
    Jun 2002
    Beiträge
    195
    Bei mir sind die lila, ist aber auch sekundär oder ... kannst mir nen Tip geben wie die Farbe auf Grau siehe oben definieren und festlegen kann

  4. #4
    TP-Member taratus macht alles soweit korrekt Avatar von taratus
    Registriert seit
    Sep 2002
    Ort
    Berlin
    Beiträge
    46
    in Deinem Code wurden einige CSS-Formatierungen durch fehlerhafte Formatierungen überlagert.
    Ich hab n paar Änderungen vorgenommen und die Stelle für die Linkfarbe kommentiert. Hier die Schnipsel die ich geändert hab:

    <style type="text/css">
    <!--
    .tds {
    background-color:silver;
    width:200;
    height:20;
    text-align:center;
    border:1px solid gray;
    font-size:14;
    filter:alpha(opacity=45);
    -moz-opacity:45%;
    cursor:crosshair;
    }
    .link {
    font:600 10pt verdana;
    color:#0066cc; /* Link-Farbe */
    text-decoration:none; /* Link unterstrichen: nein */
    }
    -->
    </style>

    und

    <body>
    <table style="border:1px groove blue; width:789;height:40" cellspacing="0" cellpadding="0" font color="#999999">
    <tr>
    <td align="center" bgcolor="silver"><img src="bilder/menu.jpg" width="786" height="20" border="0"></td>
    </tr>
    <tr>
    <td align="center" border="2">
    <table cellpadding="0" cellspacing="0" name=
    "link_table" id="link_table">
    <tr>
    <td class="tds" onmouseover="fadeImg2(0)"
    onmouseout="fadeImgend2(0)">
    <a href="#" class="link" onClick="parent.frames[1].location='kerim.html'; parent.frames[2].location='mich.html'; return false;">Über mich</a>
    </td>
    <td class="tds" onmouseover="fadeImg2(1)"
    onmouseout="fadeImgend2(1)">
    <a href="#" class="link" onClick="parent.frames[2].location='kerim.html'; parent.frames[1].location='bilder.html'; return false;">Fotos</a>
    </td>
    <td class="tds" onmouseover="fadeImg2(2)"
    onmouseout="fadeImgend2(2)">
    <a href="#" class="link" onClick="parent.frames[2].location='kerim.html'; parent.frames[1].location='tuerkei.html'; return false;">Türkei</a>
    </td>
    <td class="tds" onmouseover="fadeImg2(3)"
    onmouseout="fadeImgend2(3)">
    <a href="#" class="link" onClick="parent.frames[2].location='kerim.html'; parent.frames[1].location='islam.html'; return false;">Islam</a>
    </td>
    <td class="tds" onmouseover="fadeImg2(4)"
    onmouseout="fadeImgend2(4)">
    <a href="#" class="link" onClick="parent.frames[2].location='kerim.html'; parent.frames[1].location='links.html'; return false;">Verschiedenes</a>
    </td>
    <td class="tds" onmouseover="fadeImg2(5)"
    onmouseout="fadeImgend2(5)">
    <a href="#" class="link" onClick="parent.frames[2].location='kerim.html'; parent.frames[1].location='kontakt.html'; return false;">Kontakt</a>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </body>

  5. #5
    Guest Kerim macht alles soweit korrekt
    Registriert seit
    Jun 2002
    Beiträge
    195
    Klasse, dank dir

    Ich hatte es mit dem CSS-Attribute "a:link" versucht gehabt ...

+ Antworten

Aktive Benutzer

Aktive Benutzer

Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)

     

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51