{"id":238,"date":"2016-08-27T02:35:54","date_gmt":"2016-08-27T02:35:54","guid":{"rendered":"https:\/\/wiki.samuelchopard.ch\/?p=238"},"modified":"2019-03-18T14:29:26","modified_gmt":"2019-03-18T13:29:26","slug":"disable-a-link-using-css","status":"publish","type":"post","link":"https:\/\/samuelchopard.ch\/wiki\/library\/disable-a-link-using-css\/","title":{"rendered":"Disable a link using CSS"},"content":{"rendered":"<p><!--more--><\/p>\n<p>Add a class to your link, for example: &#8220;not-active&#8221;.<br \/>\nThen, add the following code to your CSS:<\/p>\n<pre class=\"EnlighterJSRAW\">.not-active { \/* &lt;- modify the class with the same you previously added *\/\n     pointer-events: none;\n     cursor: default;\n}<\/pre>\n<p>Source: <a target=\"_blank\" href=\"http:\/\/stackoverflow.com\/questions\/2091168\/disable-link-using-css\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/stackoverflow.com\/questions\/2091168\/disable-link-using-css<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"Add a class to your link, for example: \"not-active\". Then, add the following code to your CSS: .not-active { \/* [...]","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[85,160,305],"class_list":["post-238","post","type-post","status-publish","format-standard","hentry","category-htmlcss","tag-disable","tag-link","tag-trick"],"_links":{"self":[{"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/posts\/238","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/comments?post=238"}],"version-history":[{"count":1,"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/posts\/238\/revisions"}],"predecessor-version":[{"id":54918,"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/posts\/238\/revisions\/54918"}],"wp:attachment":[{"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/media?parent=238"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/categories?post=238"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/tags?post=238"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}