-
Website
http://dbachrach.com -
Original page
http://dbachrach.com/blog/2007/07/28/wp-syntax-makes-highlighting-a-snap/ -
Subscribe
All Comments -
Community
-
Top Commenters
-
diup
1 comment · 1 points
-
jfid
1 comment · 1 points
-
Vib
1 comment · 1 points
-
erasmo
1 comment · 1 points
-
manishmaahi
2 comments · 1 points
-
-
Popular Threads
@theY4Kman, the additional CSS extensions for wp-syntax are designed to keep the line numbers and code in sync. For example, see the above code snippet. Line 13 is longer than the box, but the line numbers stay in sync because the line of code doesn't wrap.
If you're having troubles, I suspect that other CSS formatting rules are changing the behavior of your pre tags.
Note: There are other things I could have done to make sure the line numbers stay in sync regardless of stylesheets, but another design consideration that I thought was more important was that I wanted copy-n-paste to work without also copying the line numbers. There's nothing worse than taking a code example, pasting it to try it out, then realizing you've got to manually clean it up first.