Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Removing links with CSS

  • This topic is empty.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #271482
    gombroo
    Participant

    Hello, I would like to remove links with CSS using pointer-events: none rule on the slider here.
    There are two links there: https://prnt.sc/jkou83
    The first one has been removed already. The second one (https://prnt.sc/jkosma) is still there regardless of using appriopriate css rules. Could you tell me why is that?
    Thanks!

    #271484
    Paulie_D
    Member

    What CSS have you applied?

    This should be simple enough to target based on inspecting with your developer tools that come with the browser.

    #271485
    gombroo
    Participant

    I applied pointer-events: none; and coursor:default; to element as you can see on this screen: https://prnt.sc/jkosma

    #271486
    Paulie_D
    Member

    We can’t diagnose an image….

    A demo is required I suspect…ideally a minimal version in Codepen.io.

    #271487
    gombroo
    Participant

    OK. It’s quite hard to show you this problem in codepen.io because is WordPress with tons of different css files…

    Can you see my website? The main slider: http://przyzielonymstole.pl/ ?

    The first heading”Jestem Edyta” is:
    .blog-slider-item .post-categories a {
    pointer-events: none!important;
    cursor: default!important;
    }

    The second heading “Spotkajmy siÄ™ przy zielonym stole” share the same css rules but I can’t rid of the link attached to it.

    #271618
    gombroo
    Participant

    Are you there? :)

    #271646

    you need this line for your problem

    text-decoration:none ! important;

    #271677
    gombroo
    Participant

    I’m sorry it’s not working. It didn’t remove the link.

    #271679
    chris_2080
    Participant

    Please provide an example in codepen. (e.g. https://codepen.io/chris3000/pen/odrqXy )

      pointer-events: none;
      cursor: default;
      text-decoration: none; 
    

    This should work in all modern browsers including IE 11. If you need support for IE 10 and below, you can use JS/JQuery:

    $('a.not-active').click(function(e) { 
        e.preventDefault(); 
        e.stopPropagation();
        return false; 
    });
    

    or in HTML set directly disabled:

    <a href="link.html" class="not-active" disabled>Link</a>
    
Viewing 9 posts - 1 through 9 (of 9 total)
  • The forum ‘CSS’ is closed to new topics and replies.