ben: Link der gerade offenen Seite in Navigation "aktiv"

Beitrag lesen

at steckl

sonderbarer Weise funktioniert:

A.active

aber

.active nicht.

------------------------------------------------------
mit A.active:
------------------------------------------------------

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">

<html>
<head>

<title>:link, :visited, :focus, :hover, :active</title>

<style type="text/css">

A:link, A:visited
    { font-weight:bold;
    color:black;
    text-decoration:none;
    }

A:hover
    { font-weight:bold;
    color:green;
    text-decoration:none;
    }

A:active
    { font-weight:bold;
    color:red;
    text-decoration:none; }

A.active
    { font-weight:bold;
    color:red;
    text-decoration:none; }

h1:hover { background-color:green; }
h1:active { background-color:#red; }
</style>

</head>

<body>

<h1>Navigation</h1>
<p>
<a href="../index.htm/">Index</a><br>
<a href="../videos.htm/"  class="active">Videos</a><br>
<a href="../meineseite.htm/">Meine Seite</a><br>
<a href="../suche.htm/">Suche</a>
</p>

</body>

</html>

------------------------------------------------------
mit .active:
-----------------------------------------------------

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">

<html>
<head>

<title>:link, :visited, :focus, :hover, :active</title>

<style type="text/css">

A:link, A:visited
    { font-weight:bold;
    color:black;
    text-decoration:none;
    }

A:hover
    { font-weight:bold;
    color:green;
    text-decoration:none;
    }

A:active
    { font-weight:bold;
    color:red;
    text-decoration:none; }

.active
    { font-weight:bold;
    color:red;
    text-decoration:none; }

h1:hover { background-color:green; }
h1:active { background-color:#red; }
</style>

</head>

<body>

Was ist beim 2ten Mal falsch???
<h1>Navigation</h1>
<p>
<a href="../index.htm/">Index</a><br>
<a href="../videos.htm/"  class="active">Videos</a><br>
<a href="../meineseite.htm/">Meine Seite</a><br>
<a href="../suche.htm/">Suche</a>
</p>

</body>

</html>