clarkycal clarkycal - 4 months ago 8
CSS Question

HTML + CSS Image link won't work after moving the image

Basically i want to position my Image under my name(in my website which is in the middle of the screen) when i move the image DOWN the link no longer works, i can move it left or right as much as i want and it works! but up and down, it no longer works?

HTML:

<a href="http://steamcommunity.com/id/clarkycalLad/" target="_blank">
<div class="imgtest">
<img src="/images/steam-icon.png" alt="HTML tutorial" style="width:42px;height:42px;border:0;">
</div>
</a>


CSS:

.imgtest {
position: relative;
left: 800px;
top: 100px;
border: 3px solid #73AD21;
}

Answer

Fixed: I fixed it by adding:

    z-index: 1;

To my css part of the image/Link

So before it was

    .imgtest {
  position: relative;
  left: 800px;
  top: 100px;
  border: 3px solid #73AD21;
}

Now its:

.imgtest {
    position: relative;
    left: 800px;
    top: 100px;
    border: 3px solid #73AD21;
    z-index: 1;
}

Hope this helps others! Thanks for those who tried to help!