Posted on June 22, 2020June 26, 2020Categories Blog, Programming, quick notesTags ,   Leave a comment on Select content in a div with only css

Select content in a div with only css

Just by adding that CSS and adding the class selectable to your HTML element will highlight all the inner HTML. Then the user can press ctrl+c to copy the text without needing to highlight everything. This has a very nice effect on your mobile devices. It will highlight everything on your phone which is very convenient