What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 130 Stack Exchange communities.

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.

share|improve this question
1  
I see lots of code formatted like that on the site... Might not always be your browser ;) –  Lix Oct 29 '12 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). –  luser droog Mar 8 '13 at 23:41
    
Aha. In my case I accidentally turned on "Compatibility View". Disabling fixes the problem. –  luser droog Mar 13 '13 at 1:18

2 Answers 2

up vote 3 down vote accepted

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;
}
share|improve this answer

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?:

share|improve this answer
    
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. –  David R Tribble Oct 30 '12 at 0:12
    
@Loadmaster Dude. IE 7 was released in 2006, that's six years ago... –  Bryan Dunsmore Oct 30 '12 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. –  David R Tribble Oct 30 '12 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 Oct 30 '12 at 0:49

You must log in to answer this question.

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