borrimorri
borrimorri

Reputation: 117

a:visited not working in Microsoft Edge

My site works and looks fine using Chrome, Safari, and Firefox but in the Microsoft Edge browser, my navbar breaks. Whenever I visit a page, the background color of the nav link becomes white when its supposed to stay dark blue (#293241). Here is my code:

.nav a:link, .nav a:visited {
  display: block;
  width: 100px;
  background-color: #293241;
  color: #FFF;
  padding: 7px;
  text-decoration: none;
  font-family: Francois One, sans-serif;
  text-align: center;
  text-transform: uppercase;
}
<div class="nav">
  <a href="#">test</a>
</div>

Any work around?

Upvotes: 4

Views: 2384

Answers (1)

borrimorri
borrimorri

Reputation: 117

Edited a:link and a:visited into two css sections fixed the issue. Like so:

.nav a:link {
   display:block;
   width:100px;
   background-color:#293241;
   color: #FFF;
   padding: 7px;
   text-decoration:none;
   font-family: Francois One, sans-serif;
   text-align: center;
   text-transform: uppercase;
}

.nav a:visited {
   display:block;
   width:100px;
   background-color:#293241;
   color: #FFF;
   padding: 7px;
   text-decoration:none;
   font-family: Francois One, sans-serif;
   text-align: center;
   text-transform: uppercase;
}
<div class="nav">
    <a href="#">test</a>
</div>

Upvotes: 1

Related Questions