Nav
Nav

Reputation: 103

When I click on the ext of the anchor tag it isn't taking me to another page

When I click on the ext of the anchor tag it isn't taking me to another page

.section2 {
  display: flex;
  height: 60vh;
  z-index: -100;
}

.left {
  background: url('builder.jpeg');
  width: 50%;
  border: 6px solid black;
  margin: 10px;
  border-radius: 25px;
  z-index: -1;
}

.right {
  width: 50%;
  background: url('village.jpeg');
  border: 6px solid black;
  margin: 10px;
  border-radius: 25px;
  /* opacity: 0.5; */
  z-index: -1;
}
<div class="section2">

  <div class="split left">
    <a href="builder.html"> click me</a>
  </div>

  <div class="split right">
    <a href="village.html"> click me</a>
  </div>
</div>

The above code in the anchor tags aren't taking me to another page

Upvotes: 0

Views: 58

Answers (1)

Impirator
Impirator

Reputation: 1442

The negative z-index of .section2, .left and .right are sinking the anchors into the "background" making them unclickable.

Upvotes: 1

Related Questions