woodtime / webgrind

Automatically exported from code.google.com/p/webgrind
Other
0 stars 0 forks source link

Fileviewer: line numbers and code lines do not line up in all browsers #58

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Using Firefox 3.6.8 in Ubuntu, the line numbers are a total mess.

This is because divs aren't allowed inside a code element. Here's a simple fix:
Replace the following line fileviewer.phtml :
echo "<div class='num' name='line$num' id='line$num'>$num</div>";
with:
echo "<span class='num' id='line$num'>$num</span><br />";

All features are retained, the html is more valid and all lines are lined up 
correctly. :)

Original issue reported on code.google.com by maar...@talkin.nl on 29 Aug 2010 at 11:26

GoogleCodeExporter commented 8 years ago
Unable to replicate. It looks just fine in Firefox 3.6.10 on Mac. Can you 
provide a source stating that divs are not allowed inside code elements?

Original comment by gugakf...@gmail.com on 28 Sep 2010 at 12:49

GoogleCodeExporter commented 8 years ago
Fixed in r167

Original comment by gugakf...@gmail.com on 27 Oct 2010 at 10:39

GoogleCodeExporter commented 8 years ago
Well, in Chromium 7.0.517.41 on Calculate Linux it still look like a mess, 
please add «clear: left;» into .num css class definition.

Original comment by sharkman.ru on 28 Oct 2010 at 2:56

Attachments:

GoogleCodeExporter commented 8 years ago
I don't have a similar setup to test against, but it works in similar Chrome 
version on Mac. Please check if this new "clear:left;" solves the problem in 
r172

Original comment by gugakf...@gmail.com on 28 Oct 2010 at 7:43

GoogleCodeExporter commented 8 years ago
Yes, this fixes wrong line numbering for me, thanks.

Original comment by sharkman.ru on 28 Oct 2010 at 8:24