Long time back, I was working in a project which required us to make a particular position of text unselectable by the user on a webpage.
I found this code while browsing through archives and thought of posting it here so that I know where to find it, if I need it and also it would be useful for others who want to do the same thing.
BTW, one quick disclaimer. Even I hate it when people make a particular position of text unselectable in a browser. So use it if it is really needed and also remember it is not fool-proof.
Like 2006 and 2007, I am going to participate in this year’s CSS Naked day too. This year the date has been changed to April 9th.
If you are wondering what is CSS Naked day, then this is the definition from the official site
The idea behind this event is to promote Web Standards. Plain and simple. This includes proper use of (x)html, semantic markup, a good hierarchy structure, and of course, a good ‘ol play on words. It’s time to show off your <body>.
If even you want to participate then register your site in the official site and then strip the CSS from your site. If you are on WordPress then you can use this plugin.
My latest super hero Dustin Diaz of Web standards with Imagination is launching the first annual CSS naked day on April 05, 2006 in the spirit of promoting Web Standards along with good semantic markup and proper hierarchy structures.
If you are brave enough then you can also participate by running your sites completely CSS free for the entire day. The point is to show off the “semantic-ness” of your markup. So if you are participating then just leave a comment at the announcement page. The list of participants is maintained in the official page.
Way to go Dustin! I’m in! Any takers?
PS: I was just wondering what if the webmaster has hard coded all style information using inline style attribute and is not using any external CSS file.
PSS: BTW it’s already on Digg too.