Links mit unterschiedlicher Farbe?



  • Servas!!

    Ich will hier auf meiner Homepage unterschiedlich farbige links haben aber ich schaffe es nur mit einer farbe indem ich im header
    <style type="text/css">
    body { background-color:#663333; color:#FFCC99; }
    a:link { text-decoration:none; font-weight:bold; color:red; }
    a:visited { text-decoration:none; font-weight:bold; color:red; }
    a:hover { text-decoration:none; font-weight:bold; color:yellow; }
    a:active { text-decoration:none; font-weight:bold; color:red; }
    a:focus { text-decoration:none; font-weight:bold; color:red; }
    </style>
    dies schreibe. Aber dann sind alle Links mit dieser Farbe... Also wie kann ich machen dass ich Links mit unterschiedlicher Farbe auf meiner Homepage habe?

    MERCI!!!!!



  • Du kannst mit C++ die Link-Färbung auf einzelne Gebiete begrenzen:

    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
    
    <head>
       <style type="text/css">
       .cssOne a:link,a:visited,a:active {color: black;}
       .cssOne a:hover {text-decoration: overline;}
    
       .cssTwo a:link,a:visited,a:active {color: red;}
       .cssTwo a:hover {font-weight: bold;}
       </style>
    </head>
    
    <body>
       <span class="cssOne"><a href="#">Hier deine Links</a></span>
       <span class="cssTwo"><a href="#">Hier andere Links</a></span>
    </body>
    
    </html>
    


  • MERCI 👍 👍



  • Wenn du in einem DIV einen Link hast kannst du mit:

    id_des_divs a { style }
    bzw. bei hover mit
    id_des_divs a:hover { style }
    

    angeben vornehmen.

    Ansonsten natürlich auch direkt über Klassen oder das style-Attribut des A-Tags:

    <a style="color:red" href="google.com">Google</a>
    

    MfG SideWinder



  • Kein Kommentar, das kommt davon wenn man zuerst alle Seiten aufmacht, was essen geht und dann beginnt zu beantworten ⚠

    MfG SideWinder



  • Mann css ist nicht mein ding 🙄
    Warum geht sowas zb nicht?

    <span style="a:color,a:link,a:visited,a:active,a:focus {color:red;text-decoration:none;font-weight:bold;} 
    a:hover {color:yellow;text-decoration:none;font-weight:bold}">
    <div id="Aktuelles" style="position:absolute; left:38; top:327">
    <a href="C:\blablabla">Aktuelles</a>
    </div>
    </span>
    


  • Und sowas geht auch nicht 😡 <span style="">
    <div id="Aktuelles" style="position:absolute; left:38; top:327">
    <a style = "a:link,a:visited,a:active,a:focus {color:red;text-decoration:none;font-weight:bold;}
    a:hover {color:yellow;text-decoration:none;font-weight:bold}" href="C:\blablabla">Aktuelles</a>
    </div>
    </span>
    Mann das ist ja schwieriger als c++ 😡 😡



  • Reyx schrieb:

    Du kannst mit C++ die Link-Färbung auf einzelne Gebiete begrenzen:

    das will ich ja mal stark bezweifeln 😉



  • mata schrieb:

    Reyx schrieb:

    Du kannst mit C++ die Link-Färbung auf einzelne Gebiete begrenzen:

    das will ich ja mal stark bezweifeln 😉

    Ähm... ja... da fehlen mir die Worte 🙄
    So was kommt vor 😃


Anmelden zum Antworten