HighDots Forums  

Non-selectable text

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Non-selectable text in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Christopher P. Winter
 
Posts: n/a

Default Re: Non-selectable text - 08-20-2006 , 10:05 PM






On Fri, 11 Aug 2006 16:35:53 +0200, michaelp <michaelp (AT) hio (DOT) no> wrote:

Quote:
Hello!

I am teaching programming, and display code snippets with line numbers
for easy reference.

If possible, I would like to make these line numbers non-sselectable, so
that if students copy my code from the browser, they do not need to
manually strip the line numbers to make the code work.

Does css have a style to this effect?

There's no CSS style to do this -- as others have noted.

But how about this: I assume your students have browsers that can save HTML
files as plain text. Then if you use an ordered list to generate the line
numbers, they can just save as text and the numbers won't appear.


Reply With Quote
  #12  
Old   
Wes Groleau
 
Posts: n/a

Default Re: Non-selectable text - 08-22-2006 , 09:55 PM








Christopher P. Winter wrote:
Quote:
But how about this: I assume your students have browsers that can save HTML
files as plain text. Then if you use an ordered list to generate the line
numbers, they can just save as text and the numbers won't appear.
Are you sure? Seems to me that when you save as text,
many browsers attempt to make the text resemble what
was rendered.

--
Wes Groleau

"There ain't nothin' in this world that's worth being a snot over."
-- Larry Wall


Reply With Quote
  #13  
Old   
Andy Dingley
 
Posts: n/a

Default Re: Non-selectable text - 08-23-2006 , 05:32 AM



michaelp wrote:

Quote:
I am teaching programming, and display code snippets with line numbers
for easy reference.
What's a "line number" ?

Is that like FORTRAN?



Reply With Quote
  #14  
Old   
Christopher P. Winter
 
Posts: n/a

Default Re: Non-selectable text - 08-23-2006 , 10:20 PM



On Wed, 23 Aug 2006 01:55:16 GMT, Wes Groleau <groleau+news (AT) freeshell (DOT) org>
wrote:

Quote:

Christopher P. Winter wrote:
But how about this: I assume your students have browsers that can save HTML
files as plain text. Then if you use an ordered list to generate the line
numbers, they can just save as text and the numbers won't appear.

Are you sure? Seems to me that when you save as text,
many browsers attempt to make the text resemble what
was rendered.
Before posting, I tried it in IE6, and it did strip out the numbers.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.