Why does adding float:left to my css make my link unclickable?

前端 未结 4 2224
清歌不尽
清歌不尽 2021-02-12 01:31

I have a view with a section defined thus:

<%=ViewData.Model.Body %>

4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-12 02:11

    The fix is pretty simple and cross browser too, add this (to your unclickable link):

    #QuestionEditLink, #QuestionHistoryLink {
        position: relative;
        z-index: 10;
    }
    

    The fix here is the z-index, but it won't work if position isn't relative/absolute/fixed.

    For more info on z-index see https://developer.mozilla.org/en-US/docs/Web/CSS/z-index

    Have used this all the time, is simple, works in all browsers (IE6+, FF, Chrome, Safari, Opera).

    Since others already said about your CSS issues there, I won't add to it. Just providing a solution, by the way, tested it with your provided JSBin, worked as always!

提交回复
热议问题