2

The source code displays for StackOverflow.com are not being displayed with any indentation when viewed with IE 7. Cut-and-paste to a text editor works okay, adding the necessary spaces for indentation. The indentation spaces are just not showing up on the post pages themselves. (All other spaces are showing up.)

Did something change since last week, when this was working?

Example of what code looks like with IE 7:

int foo(int size)
{
if (size <= 64*1024)
{
unsigned char   arr[64*1024];
return bar(arr, size);
}
else if (size <= 1*1024*1024)
{
unsigned char   arr[1*1024*1024];
return bar(arr, size);
}
else
return -1;
}

Details: I'm using IE 7.0.5730.13, on Windows XP Pro 2002 sp3.

3
  • 1
    I see lots of code formatted like that on the site... Might not always be your browser ;)
    – Lix
    Commented Oct 29, 2012 at 23:54
  • Same thing just started happening to me today. All code indentation on the whole site is being suppressed from my view. IE 10.0.9200.16484. Selecting view->style->no-style at least makes the code visible (while mutilating everything else). Commented Mar 8, 2013 at 23:41
  • Aha. In my case I accidentally turned on "Compatibility View". Disabling fixes the problem. Commented Mar 13, 2013 at 1:18

2 Answers 2

3

Disregarding the fact that this is and that IE7 is (reasonably) no longer supported, adding white-space: pre; to the <code> element seems to fix this fairly easily:

.post-text pre > code:first-child, .wmd-preview pre > code:first-child {
    max-height: 600px\9;
    display: block\9;
    white-space: pre\9;
}
6

IE7 is explicitly not supported, so you're probably better off switching to a new browser.

Which browsers are officially supported, and what else do I need?:

4
  • Well, I'm using what I have at work (a fortune 100 company), which is IE 7. So it's not easy to switch to another browser. BTW, why is IE7 not supported? It's not that old. Commented Oct 30, 2012 at 0:12
  • @Loadmaster Dude. IE 7 was released in 2006, that's six years ago...
    – user184498
    Commented Oct 30, 2012 at 0:14
  • 1
    Yes, some larger institutions don't relish the idea of upgrading web browsers for 30,000+ users (and all of the apps coded for them) every year, or even every five years. This is the real world, man. Commented Oct 30, 2012 at 0:30
  • 1
    @Loadmaster Support is based on popularity. "As of May 2012, estimates of IE7's global market share were 1.5-5%."
    – blahdiblah
    Commented Oct 30, 2012 at 0:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .