Cannot Click HTML Link After Using CSS Float

Posted By Weston Ganger

I tried to use float right on my <a> tag. Turns out this is one of those weird CSS problems.

Instead of fixing this, you should probably just remove the CSS float and add text-align: right;

If you cant change that or it doesn't make sense to do so then here's the fix to make the link clickable again.

.your-link{
  float: right;
  position: relative; // can be either relative, absolute, or fixed 
  z-index: 10; // this fixes it but requires one of the above positions
}

Related External Links:

Article Topic:Software Development - HTML / CSS

Date:November 11, 2015