TheRealKoston: Problem bei Navigation

Hallo,
habe folgendes Problem, und noch keine Antwort durch Suche etc. aufgefunden:

Bei onmouseover wird die Schriftart weiß, wenn ich den Cursor drüberbewege, wenn ich allerdings von der Schrift abweiche, wird die Cell zwar schwarz, aber auch die Schrift :/ - Wie kann ich bei "aktiver Cell", die Schriftart konstant weiß lassen?

Vielen Dank!

(p.s.: Es handelt sich um eine Navigation)

Quellcode:

<html>
<head>
<title>::] blabla [::</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
body { font-size : 11px; font-family : arial,helvetica,sans-serif; font-weight : normal; font-style : normal; color : #FFFFFF; }
a:link  { font-size : 12px; color : #000000; text-decoration : none; }
a:active { font-size : 12px; color : #FFFFFF; text-decoration : none; }
a:visited { font-size : 12px; color : #000000; text-decoration : none; }
a:hover  { font-size : 12px; color : #FFFFFF; text-decoration : none; }
td    { font-size : 14px; font-family : helvetica,arial,sans-serif; font-weight : normal; font-style : normal; color : #FFFFFF; }
</style>
</head>

<body bgcolor="#CCCCCC" text="#000000" leftmargin="5" topmargin="0" marginwidth="0" marginheight="0">
<img src="img/topnav.gif" width="134" height="48">
<table width="135" bgcolor=#000000 width="0" border="0" cellspacing="1" cellpadding="0">
<tr>
<td>
<table width="134" bgcolor=#CCCCCC width="0" border="0" cellspacing="2" cellpadding="0">
<tr>
<td bgcolor=#000000 align=center>
:: Navigation ::
</td>
</tr>
<tr>
<td onmouseover=this.style.backgroundColor='#000000' onmouseout=this.style.backgroundColor='#CCCCCC'>
&nbsp;<a href="test.html" target=main>Menupunkt 1</a>
</td>
</tr>
<!-- um weitere menüpunkte hinzuzufügen den teil von hier !-->
<tr>
<td onmouseover=this.style.backgroundColor='#000000' onmouseout=this.style.backgroundColor='#CCCCCC'>
&nbsp;<a href="test.html" target=main>Menupunkt 2</a>
</td>
</tr>
<!-- bis hier kopieren und einfügen !-->
</table>
</td>
</tr>
</table>
<br>
<img src="img/downnav.gif" width="136" height="49">
</body>
</html>

  1. Hallo,
    habe folgendes Problem, und noch keine Antwort durch Suche etc. aufgefunden:

    Bei onmouseover wird die Schriftart weiß, wenn ich den Cursor drüberbewege, wenn ich allerdings von der Schrift abweiche, wird die Cell zwar schwarz, aber auch die Schrift :/ - Wie kann ich bei "aktiver Cell", die Schriftart konstant weiß lassen?

    Vielen Dank!

    (p.s.: Es handelt sich um eine Navigation)

    Quellcode:

    [..]

    <td onmouseover=this.style.backgroundColor='#000000' onmouseout=this.style.backgroundColor='#CCCCCC'>

    [..]

    Lass den Javascript mist weg, das geht wunderbar ohne:

    <style>

    a
    {
     display:block;
     background-color:white;
     color:black;
     width:150px;
    }
    a:hover
    {
     background-color:black;
     color:white;
    }

    </style>

    <a href="">Test</a>
    <a href="">Test</a>
    <a href="">Test</a>

    1. sry, die hälfte vergessen, es muss natürlich heissen:

      a:hover, a:active
      {
       background-color:black;
       color:white;
      }

      1. Also deine Lösung funktioniert bei mir nicht bzw. es wird nicht so wie erwünscht dargestellt :/

        1. Also deine Lösung funktioniert bei mir nicht bzw. es wird nicht so wie erwünscht dargestellt :/

          aha, uns was wir nicht so dargestellt wie es sollte?

          1. Also deine Lösung funktioniert bei mir nicht bzw. es wird nicht so wie erwünscht dargestellt :/

            aha, uns was wir nicht so dargestellt wie es sollte?

            Naja, ich schick dir ne Email mit Screeny, falls es okay ist?

            1. Also deine Lösung funktioniert bei mir nicht bzw. es wird nicht so wie erwünscht dargestellt :/

              aha, uns was wir nicht so dargestellt wie es sollte?

              Naja, ich schick dir ne Email mit Screeny, falls es okay ist?

              du kannst es auch hier beschreiben, vieleicht nützts dann irgendwann mal jemand anderem auch...

              1. Habe ich das nicht bereits?

                1. Habe ich das nicht bereits?

                  Sorry, habe ich überlesen und gleich versucht, hier bleibt leider das "::Navigation::" weiß und passt nicht zum restlichen Style! :(

                  Ansonsten würde der Farbwechsel passen - Könnte man den auch in meinen Quellcode einbauen?

                  Danke schon mal!

                  1. Hust. Hast du dich mit den Grundzügen von CSS beschäftigt bevor du gefragt hast? Die Farbanweisung lässt sich doch ganz einfach ändern.

                    1. Hust. Hast du dich mit den Grundzügen von CSS beschäftigt bevor du gefragt hast? Die Farbanweisung lässt sich doch ganz einfach ändern.

                      Ganz ehrlich: Der Code ist uralt (ich denk so 5 Jahre), hab seit dem nichts mehr mit CSS etc. gemacht - deshalb kenn ich mich nicht wirklich aus.

                      Hab schon paar Freunde gefragt, aber die kommen auch nicht weiter, möchte ja nur, dass die Schrift weissbleibt, wenn man bisschen von der Schrift, aber in der Cell bleibt, weiß bleibt.

                      Hast du dir die fertige HTML mal angeschaut? :)

                      Vielen Dank schon mal! :)

                      1. Wenn mir nicht grade unglaublich langweilig wäre würde ich es dir nicht vorkauen...

                        also:

                        <html>
                        <head>
                        <title>::] blabla [::</title>
                        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
                        <style type="text/css">
                        body { font-size : 1.0em; font-family : arial,helvetica,sans-serif; color : #FFFFFF; }
                        #navigation { width: 131px; color: #FFFFFF; background-color: #000000; text-align: center; font-size:0.85em; margin: 2px 2px}
                        #box { width: 135px; border: 1px solid #000000;}
                        a  { font-size :0.75em; color : #000000; text-decoration : none; width: 130px; display: block; padding-left: 5px; background-color: transparent; margin: 2px 0;}
                        a:hover  { color : #FFFFFF; background-color: #000000;; }
                        </style>
                        </head>

                        <body bgcolor="#CCCCCC" text="#000000" leftmargin="5" topmargin="0" marginwidth="0" marginheight="0">
                        <img src="./img/topnav.gif" width="134" height="48">
                        <div id="box">
                        <div id="navigation">:: Navigation ::</div>
                        <a href="test.html" target="main">Menupunkt 1</a>
                        <a href="test.html" target="main">Menupunkt 2</a>
                        </div>
                        <img src="./img/downnav.gif" width="136" height="49">
                        </body>
                        </html>

                        1. Funktioniert wunderbar.
                          Vielen Dank! :)

        2. <html>
          <head>
          <title>::] blabla [::</title>
          <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
          <style type="text/css">
          body { font-size : 11px; font-family : arial,helvetica,sans-serif; color : #FFFFFF; }
          #navigation { width: 135px; color: #000000; background-color: #FFFFFF;}
          a  { font-size : 12px; color : #000000; text-decoration : none; width: 130px; display: block; padding-left: 5px; background-color: #FFFFFF;}
          a:hover  { color : #FFFFFF; background-color: #000000;; }
          </style>
          </head>

          <body bgcolor="#CCCCCC" text="#000000" leftmargin="5" topmargin="0" marginwidth="0" marginheight="0">
          <img src="./img/topnav.gif" width="134" height="48">
          <div id="navigation">:: Navigation ::</div>
          <a href="test.html" target="main">Menupunkt 1</a>
          <a href="test.html" target=main>Menupunkt 2</a>
          <img src="./img/downnav.gif" width="136" height="49">
          </body>
          </html>

          Und das funktioniert nicht?