Improved code display with wp-syntax


We just improved the blog to improve the display of sourcecode. Since the layout is very narrow, there isn’t much space for code. So now, when you hover your mouse over a code passage it enlarges to the full width available, and shrinks again when you move your mouse out of it. I hope you enjoy it!

For the intrigued of you: We just changed line 89 of wp-syntax.php to include mouseover and mouseout events on the code-div:

$output = "\n<div class=\"wp_syntax\" onmouseover=\"this.className='wp_syntax mouseover'\" onmouseout=\"this.className='wp_syntax'\">";

There we add and remove a class named mouseover, and styled that class so that the div is wider. Simple, yet effective.

Information and Links

Join the fray by commenting, tracking what others have to say, or linking to it from your blog.


Other Posts

Write a Comment

Take a moment to comment and tell us what you think. Some basic HTML is allowed for formatting.

Reader Comments

Hovering over the scrollbar is cool! ;-)