Gandalf
Gandalf

Reputation: 13693

styling links inside a div with a specific class

I am wondering how i would be able to style links inside a given div with a given class like

.navigation-div : a:link,a:visited {
  color:red;
  }

Some html

  <div class="navigation-div">
  <a href="home.php">Home</a>
  <a href="home.php">List</a>
  <a href="home.php">Download</a>
  <a href="home.php">Files Used</a>
  <a href="home.php">Documentation</a>
  </div>

  <div class="client-header">
  <h1><a href="home.php">CRUD Application</a></h1>
  </div>

Is there a selector for this kind of thing?.

Upvotes: 12

Views: 55211

Answers (1)

j08691
j08691

Reputation: 207901

.navigation-div a:link, .navigation-div a:visited {
    color:red;
}

jsFiddle example

Upvotes: 25

Related Questions