liebewinter: Welche Pseudoklasse benutze für meinen Link

Beitrag lesen

hallo , ich habe wie du sagst , aber bekomme keine aria-current Attribut…

so , ich habe drei dateien , beispiel-1.php , beispiel-2.php und beispiel-3.php

auf alle drei habe so geschrieben…

<?php  
$current_page = "1";
include 'header-beispiel.php';

header("Content-Type: text/html; Charset=utf-8");
mb_internal_encoding('UTF-8');
date_default_timezone_set('UTC');
error_reporting(E_ALL);

?>

<!doctype html>
<html lang="en">

<head>

<meta http-equiv="content-type" content="text/html; charset=UTF-8">

<title>beispiel-1</title>

</head>

<style>

</style>

<body>

<h3>Page 1</h3>



</body>
</html<

bei ihnen nur verendert $current_page = "1"; , das ist die variable Nummer…

dann habe der header-beispiel.php , wo meine Code steht..

<?php  

header("Content-Type: text/html; Charset=utf-8");
mb_internal_encoding('UTF-8');
date_default_timezone_set('UTC');
error_reporting(E_ALL);

?>

<!doctype html>

<html lang="en">

<head>

<meta http-equiv="content-type" content="text/html; charset=UTF-8">

<title>header-beispiel</title>

</head>
<style>

.link_wechsel ul {

    list-style-type: none;

    margin-left: 340px;

}

 

.link_wechsel li {

  display: inline;

}

 

.link_wechsel a {

   display: inline;

   text-decoration: none;

   border: 1px solid gray;

   background-color: #FE2E64;

   color: black;

   padding: 8px;

   opacity: 0.5;

   font-family: Times New Roman;

}

 

.link_wechsel a:hover {

   background-color: #9f9e9e;

}

 
.link_wechsel a.[aria-current=page] {

 
  background-color:green;

}

 


</style>

<body>

<nav class="link_wechsel">
      <h2 class="visually-hidden">Page navigation</h2>
      <ul>
        <li><a <?php if ($current_page=="1"): ?>aria-current="page" <?php endif ?> href="beispiel-1.php">1</a></li>
        <li><a <?php if ($current_page=="2"): ?>aria-current="page" <?php endif ?> href="beispiel-2.php">2</a></li>
        <li><a <?php if ($current_page=="3"): ?>aria-current="page" <?php endif ?> href="beispiel-3.php">3</a></li>

      </ul>
</nav>

</body>
</html>

ich bekomme alles gut als die Farbe verenderung...

0 58

Welche Pseudoklasse benutze für meinen Link

liebewinter
  • css
  • meinung
  1. 2
    Rolf B
    1. 0
      liebewinter
    2. 1
      Gunnar Bittersmann
      • css
      • html
      1. 0
        liebewinter
      2. 0
        liebewinter
        1. 0
          Matthias Apsel
          1. 0
            liebewinter
            1. 0
              ursus contionabundo
            2. 0
              Rolf B
              1. 0
                liebewinter
                1. 0
                  Rolf B
                  1. 0
                    liebewinter
  2. -1
    ursus contionabundo
    1. 0
      Rolf B
      1. 0
        ursus contionabundo
        1. 0
          Rolf B
          1. 0
            ursus contionabundo
        2. 1
          Rolf B
          1. 0
            ursus contionabundo
        3. 1
          Gunnar Bittersmann
          1. 0
            ursus contionabundo
        4. 1
          Matthias Apsel
          1. 0
            ursus contionabundo
    2. 0
      beatovich
      1. 0
        Matthias Apsel
        1. 0
          beatovich
          1. 0
            Matthias Apsel
            1. 0
              beatovich
        2. 0
          liebewinter
          1. 1
            Gunnar Bittersmann
            • javascript
            1. 0
              Gunnar Bittersmann
            2. 0
              beatovich
              1. 0
                Gunnar Bittersmann
                1. 0
                  beatovich
            3. 0
              liebewinter
              1. 0
                Gunnar Bittersmann
                • css
                • html
                • javascript
            4. 0
              liebewinter
              1. 0
                Rolf B
                1. 0
                  liebewinter
                  1. 0
                    Rolf B
                    1. 0
                      liebewinter
                      1. 0
                        Rolf B
                        1. 0
                          liebewinter
                        2. 0
                          Gunnar Bittersmann
                          • html
                          • php
                        3. 0
                          liebewinter
                    2. 0
                      Gunnar Bittersmann
                      • html
                      1. 0
                        Tabellenkalk
                2. 0
                  Gunnar Bittersmann
      2. 0
        Rolf B
        1. 0
          beatovich
          1. 0
            Rolf B
          2. 0
            beatovich
            1. 2
              Orlok
              • programmiertechnik
            2. 1
              Rolf B
              1. 0
                beatovich
                1. 0
                  Rolf B
                2. 0
                  Matthias Apsel