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

Recommended Posts

Contact

604-309-8713
info@solidfoundationwebdev.com

Send Me A Message

I would love to get in touch and talk about your next project. Feel free to send a message and I will get back to you shortly.

Get Connected