Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cursor: pointer doesn't work on :after element?

Tags:

html

css

People also ask

Why is my cursor pointer not working?

Check that the battery of the mouse is charged. Make sure that the receiver (dongle) is firmly plugged in to the computer. If your mouse and receiver can operate on different radio channels, make sure that they are both set to the same channel.

How do you combine cursor not allowed and pointer events none?

you can't do this because pointer-events: none; disable all mouse functions, but you can do a trick and wrap your button with a div then use cursor: not-allowed; on this. Work great.


Instead of setting the cursor: pointer on the :after element, set it on the entire li and it will show up on both.

Edit:
For those of you trying to have different cursors on the li and its :after pseudo-element, you simply need to explicitly define the cursor property of the content inside the li. See this updated fiddle: http://jsfiddle.net/qKMPQ/20/

<ul>
    <li>
        <a href="#"></a>
    </li>
</ul>
ul { list-style-type: none; }
li { cursor: pointer; }
a {
    background: red;
    float: left;
    width: 100px;
    height: 100px;
    cursor: help;
    display: block; }
li:after {
    content: "";
    background: yellow;
    float: left;
    width: 100px;
    height: 100px;
    display: block; }