A Digital Age Deserves A Digital Leader

Code Highlighter

Code Highlighter

Postby jbullard » Wed Oct 24, 2007 2:55 am

Guys,

Maybe someone can help me out on this situation I am having. I am creating a code highlighter and am having just a little bit of trouble. The part that I am having the trouble is that I am using ordered lists to recreate the line numbers for thecode. Now, in IE, it displays every appropriately with some numbers highlighted just because the span tag wraps around it.

I really didn't want that but it is kinda cool to begin with because it displays the code in a way that it says 'Hey, I am a multi-line comment or wrapped around string.'

The actual problem is that because the span tag wraps around <li></li> tags that it causes the next line number and code not to show. In FF, it causes the line numbers to show but only highlights the first line.

So basically, does anyone know of a way to get line numbers to display with the following specs.

- When code is wrapped from a perviously line it does not need to automatically add a line number to it

- Code needs to remain in it's highlighted state and numbers not

- When selecting the code, line numbers do not need to be highlighted

Those are the three main things.

You can view the <a href="http://www.codingdesigns.net">code highlighting</a> if you need a better understanding.
VP - Software
User avatar
Posts: 3653
Joined: Sun Jun 06, 2004 10:17 pm
Location: Utah
Real Name: Jason Bullard

Return to HTML, CSS, and Scripts

Who is online

Users browsing this forum: No registered users and 6 guests