• Resolved lhooper

    (@lhooper)


    Is there something different about how single.php is served that would cause IE to behave differently than on any other page?

    Here is a page that uses single.php:

    https://lolabeta.com/cupcakes/coconut-margarita/

    It is displaying as intended in Chrome and Firefox, but it is breaking in IE9, IE8 and probably other IE versions. (I am using Win7 32 bit.)

    Specifically, the widths/padding/margins of divs are not being interpreted correctly — and more specifically, IE is interpreting them differently on this page than on other pages in the site that use the same header/footer, styles, etc.

    (So, to be clear, the problem is not just IE vs. other browsers, but IE on this specific page vs. IE on other pages.)

    Compare the page above to another page in the site, such as this:

    https://lolabeta.com/cupcakes/

    Looking with IE9 just at the very top navigation menu with IE9, for instance (where it says “Location & Hours,” etc.) — on the broken page the div (id=tool-menu) is far wider than its content, while on the non-broken page it fits its content.

    On both pages the menu is being drawn using the same markup from header.php. Both pages also use footer.php and the page templates themselves don’t (I believe) have unclosed tags.

    So I’m wondering: Is it there something different about single.php?? Something that is throwing IE but not other browsers?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Is it there something different about single.php??

    Generally speaking, no. On the page you linked to, the invalid markup and CSS errors could have a lot to do with it.

    Thread Starter lhooper

    (@lhooper)

    Thank you, esmi, for looking & responding. I’m sure the various things noted by the validators aren’t helping — and I apologize for pointing folks at sloppy work — but almost none of the validation errors are unique to the page in question, and they’re not breaking other pages. That’s what led to my query. The behavior itself is strange, I think.

    Thread Starter lhooper

    (@lhooper)

    OK, I resolved this. Here is the explanation if anyone else happens to have the same issue:

    In editing single.php, I added a <!-- comment --> at the very top of the file, before the_post(). This was strictly for my own benefit, to remind me what the file did.

    Anyway, other browsers didn’t mind this. But IE reacted by (it seems) changing its interpretation of markup/CSS throughout the entire page — in particular, affecting the widths of various things. I don’t understand why this would be the case, but removing the comment solved the issue entirely.

    The links above no longer illustrate the problem, but hopefully the explanation is enough to help someone else who (however naively) has added a comment at the top of single.php.

    mitzi

    (@naamasuissagmailcom)

    thanks so much! your tip was a life saver!!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Single.php breaking in IE?’ is closed to new replies.