{"id":1408,"date":"2017-01-10T07:29:01","date_gmt":"2017-01-10T07:29:01","guid":{"rendered":"http:\/\/myprojects.advchaweb.com\/?p=1408"},"modified":"2017-01-10T07:32:39","modified_gmt":"2017-01-10T07:32:39","slug":"css-tips-tricks","status":"publish","type":"post","link":"https:\/\/myprojects.advchaweb.com\/index.php\/2017\/01\/10\/css-tips-tricks\/","title":{"rendered":"CSS Tips &#038; Tricks"},"content":{"rendered":"<ol>\n<li>How to disable text selection on a page website?<br \/>\nSOLUTION: Ref: <a href=\"http:\/\/stackoverflow.com\/questions\/826782\/how-to-disable-text-selection-highlighting-using-css\">How to disable text selection highlighting using CSS?<\/a><br \/>\nUse <span style=\"background-color: #008000;\">user-select<\/span>.<\/p>\n<pre class=\"lang:default decode:true \">.noselect {\r\n  -webkit-touch-callout: none; \/* iOS Safari *\/\r\n    -webkit-user-select: none; \/* Chrome\/Safari\/Opera *\/\r\n     -khtml-user-select: none; \/* Konqueror *\/\r\n       -moz-user-select: none; \/* Firefox *\/\r\n        -ms-user-select: none; \/* Internet Explorer\/Edge *\/\r\n            user-select: none; \/* Non-prefixed version, currently\r\n                                  not supported by any browser *\/\r\n}\r\n&lt;p&gt;\r\n  Selectable text.\r\n&lt;\/p&gt;\r\n&lt;p class=\"noselect\"&gt;\r\n  Unselectable text.\r\n&lt;\/p&gt;<\/pre>\n<p>Or in body selector (css):<\/p>\n<pre class=\"lang:default decode:true \">body\r\n{\r\n    -moz-user-select: none;\r\n    -khtml-user-select: none;\r\n    user-select: none;\r\n}<\/pre>\n<p>Then also put\u00a0<span style=\"background-color: #008000;\">onselectstart=&#8221;return false&#8221;<\/span> in body tag (html):<\/p>\n<pre class=\"lang:default decode:true\">&lt;body onselectstart=\"return false\" style=\"margin-top: 0px;\" bgcolor=\"#DDDDDD\"&gt;\r\n...\r\n&lt;\/body&gt;<\/pre>\n<p>Local file: \/media\/data\/MASTER\/oDesk\/test_answer\/php-694.html<br \/>\n\/media\/data\/MASTER\/oDesk\/test_answer\/php-694_files\/phpkb.css<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>How to disable text selection on a page website? SOLUTION: Ref: How to disable text selection highlighting using CSS? Use user-select. .noselect { -webkit-touch-callout: none; \/* iOS Safari *\/ -webkit-user-select: none; \/* Chrome\/Safari\/Opera *\/ -khtml-user-select: none; \/* Konqueror *\/ -moz-user-select: none; \/* Firefox *\/ -ms-user-select: none; \/* Internet Explorer\/Edge *\/ user-select: none; \/* Non-prefixed version, &hellip; <a href=\"https:\/\/myprojects.advchaweb.com\/index.php\/2017\/01\/10\/css-tips-tricks\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;CSS Tips &#038; Tricks&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[52],"tags":[],"class_list":["post-1408","post","type-post","status-publish","format-standard","hentry","category-css"],"_links":{"self":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts\/1408","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/comments?post=1408"}],"version-history":[{"count":3,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts\/1408\/revisions"}],"predecessor-version":[{"id":1411,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts\/1408\/revisions\/1411"}],"wp:attachment":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/media?parent=1408"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/categories?post=1408"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/tags?post=1408"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}