+ 1

Selecting an element in CSS

I want to select only text in my html page , and don't want images to be selected , so I used the property user-select : none; But at the same time I also want images to be not abled to copied or any action performed on them User select I changed the draggable property to false so that images are not able to be dragged and By using the user-select Images are not selected But When I selected text along with images images were not selected but we're draggable along with texts Pls help me , with this that how can I make the images part of the webpage and no action to be allowed on it.

7th May 2020, 5:12 PM
Shubham Pandey
Shubham Pandey - avatar
3 odpowiedzi
+ 3
Shubham Pandey Try this on image pointer-events: none;
7th May 2020, 5:30 PM
Raj Chhatrala
Raj Chhatrala - avatar
0
But , selection still happens even though events on image cancels At this point ,if I use both user select and pointer event then styling of last written property cancels the first What I mean is if I write img { pointer-events : none ; user-select: none; } Then pointer event property acts like it's not written and when I write reversing the order then user-select acts like it's not written So finally I want property of user -select as well as pointer event Pls help me with it🙏
7th May 2020, 6:03 PM
Shubham Pandey
Shubham Pandey - avatar