A: does not work in Microsoft Edge

My site works and looks great using Chrome, Safari and Firefox, but my browser breaks in the Microsoft Edge browser. Whenever I visit a page, the background color of the navigation link turns white when it should remain 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>
Run codeHide result

Any work around?

+4
source share
1 answer

Edited the link a: a and: visited in two sections of css fixed the problem. For example:

.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>
Run codeHide result
+1
source

All Articles