[CSS] Navigation

Status
Nicht offen für weitere Antworten.
F

fullox

Hallo, habe mir eine Navigation aus CSS gebastelt, jedoch funktioniert der Code für den aktiven Link nicht, kann mir jemand helfen?

CSS-Code der kompl. Navigation
Code:
<style type="text/css"">
<!--
div.leftnav      {
            width: 183px;
            font-family: Verdana;
            font-size: 7pt;
            color: black;
            text-align: left;
                   }
  .navleft a       {
            height: 18px;
            margin: 0px;
            padding: 3px 0px 0px 15px;
            border: 0px none;
            color: black;
            background-color: #E9ECF1;
            text-decoration: none;
            display: block;
                   }
  .navleft a:hover {
            color: white;
            background-color: #3A6EA5;
                   }
  .navleft p       {
            height: 18px;
            margin: 0px;
            padding: 3px 0px 0px 0px;
            border: 0px none;
            color: white;
            background-color: #3A6EA5;
            text-decoration: none;
            display: block;
                   }
-->
</style>

Link-Code
Code:
<td style="cursor: hand;"><DIV CLASS="leftnav"><DIV CLASS="navleft"><A href="?modul=ueber">Über uns</a></div>"

--------------------------------------------------------------------------------

Code:
  .navleft p       {
            height: 18px;
            margin: 0px;
            padding: 3px 0px 0px 0px;
            border: 0px none;
            color: white;
            background-color: #3A6EA5;
            text-decoration: none;
            display: block;
                   }

Dies wäre der Code für den aktiven Link, jedoch funktioniert der nicht wirklich.
 
1. du musst den link als id angeben
PHP:
<html><head>
<style>
div.leftnav{
	width:183px; font-family:verdana; font-size:9px; color:black; text-align:left}
#navleft a:link{
	height:18px; margin:0px; padding:3px; border:0px; color:black; background-color:#E9ECF1; text-decoration:none; display:block}
#navleft a:visited{
	height:18px; margin:0px; padding:3px; border:0px; color:black;background-color: #E9ECF1; text-decoration:none; display:block}
#navleft a:hover {
	color: white; background-color:#3A6EA5;}
#navleft a:active{
	height: 18px; margin:0px; padding:3px; border:0px; color:white; background-color:#3A6EA5; text-decoration:none; display:block}
table{
border:0px}
</style>
</head><body>
<table>
<tr>
<div class="leftnav"><td width="317" id="navleft"><a href="#">dfgdfgdfg</a></td></div>
</tr>
</table>
</body></html>

so sollte es funktionieren

2. was soll das mit dem padding:3px 0px 0px 0px
 
Zuletzt bearbeitet:
Status
Nicht offen für weitere Antworten.

Neue Beiträge

Zurück