4

A code section like this:

for (int i = 0; i < 10; ++i)

Often (but not always) is rendered like this (with an unexpected 1 pixel solid line on the left):

I saw this strange behavior only on IE11 on Windows 8.1 (I tried both with Chrome and IE10 on Windows 7 and I never saw it, I don't know about IE11 on Windows 7).

EDIT The scroll bar on the bottom is standard Windows 8 scroll bar. It seems line appears only when horizontal scroll bar is present, for example this code:

for (int i = 0; i < 10; ++i)

It won't have line but this code will have:

for (int i = 0; i < 10; ++i)
{
    cout << "This is a very long line of text, it won't fit on one single line! Number #" << i << endl;
}

It's rendered like this:

Note that if long line is "alone" (in this case without { and }) then line won't appear. Moreover sometimes (even for same text) is visible and sometimes not (randomly both in preview and in page).

EDIT 2 This seems to be an IE11 bug, during scrolling that black line appears (few moments) even in horizontal. I didn't understand how this is related to SO's CSS (see comments) and I didn't see it with other sites but I saw sometimes is a dashed line and scrolling page it becomes solid again. I would say it's not a problem for SO's developers...

  • 1
    Sadly, no-repro on IE11 Windows 7. – Qantas 94 Heavy Nov 14 '13 at 11:56
  • Is that the default scrollbar or some sort of AddOn? – Time Traveling Bobby Nov 14 '13 at 11:58
  • 3
    @TimeTravelingBobby That's a Windows 8 standard scrollbar. – michaelb958 Nov 14 '13 at 11:58
  • 1
    @TimeTravelingBobby yes the scrollbar on bottom is default one for Win8, what shouldn't be there is the dark line on the left (and sometimes it's not there). – Adriano Repetti Nov 14 '13 at 12:34
  • Repro'd on IE11 on Win 8.1 Pro and Win 8.1 RT (desktop version of IE). It is fine on the Metro (Windows Store) version of IE. – chue x Nov 14 '13 at 16:40
  • @Adriano can you corellate the dark line with the scrollbar appearance? Does the line appear consistently per-post? – John Dvorak Nov 14 '13 at 16:49
  • @JanDvorak for what I saw it appears only when horizontal scroll bar is visible. That said even a small change will make it disappear (for example when I added image in my last example the line did disappear from code block BUT it's still visible in preview while editing the question). It may even be a Win81+IE11 problem more than a SO problem but I saw this only on this site. – Adriano Repetti Nov 14 '13 at 18:29
  • @Adriano did you try some inspection in the debugger console? – John Dvorak Nov 14 '13 at 18:49
  • 1
    @JanDvorak just a look, of course removing overflow:auto from pre will fix it (and h.scroll will disappear too). I didn't see anything "strange" and calculated style seems correct (curiously removing background color will fix it too, is it just an IE rendering problem? I just tried disabling GPU rendering but problem is still there) – Adriano Repetti Nov 14 '13 at 19:12
  • 1
    Gotta love IE11 – ʞunɥdɐpɐɥd Dec 19 '13 at 21:04

You must log in to answer this question.

Browse other questions tagged .