Posts

Showing posts with the label Selection

Disable Text Selection In WebPage Using CSS.

Image
To Disable Text Selection it takes only Two steps:- Make a HTML file and define markup for webpage Make a CSS file and define styling to disable the text Step 1.Make a HTML file and define markup for web page We make a HTML file and save it with a name  Index.html <!DOCTYPE html> <html> <head> < link rel = "stylesheet" type = "text/css" href = "disable.css" > </head> <body> < h1 > Disable Text Selection In Website Using CSS < /h1 > < p class = "select" > Select The Text In This Paragraph This Is Selectable Like Any Other Text < /p > < p class = "no_select" > Try To Select This Text You Are Not Able To Select This Text In Modern Browsers < /p > </body> </html> Step 2.Make a CSS file and define styling to disable the text We make a CSS file and save it with name  disable.css body { background - color

Disable Text Selection In Web Page Using java script

Image
To Disable Text Selection it takes only Two steps:- Make a HTML file and define markup for webpage Write Java Script Block In Html file. Step 1.Make a HTML file and define markup for web page We make a HTML file and save it with a name  Index.html <!DOCTYPE html> <html> <head> < link rel = "stylesheet" type = "text/css" href = "disable.css" > </head> <body> < h1 > Disable Text Selection In Website Using CSS < /h1 > < p class = "select" > Select The Text In This Paragraph This Is Selectable Like Any Other Text < /p > < p class = "no_select" > Try To Select This Text You Are Not Able To Select This Text In Modern Browsers < /p > </body> </html> Step 2. Write java script into script Block in Html or Web Page. Disable context menu with jQuery $ ( document ). on ( "contextmenu" , function ( even